@e-llm-studio/federated-dashboard-components 1.0.12-human-intel-test → 1.0.13-audacy-test
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/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/ExecutiveDashboard/api/dashboardApi.js +1 -1
- package/dist/ExecutiveDashboard/components/BarChart/BarChart.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChart.js.map +1 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartEmptyState.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartEmptyState.js.map +1 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartSkeleton.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartSkeleton.js.map +1 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartTooltip.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/BarChartTooltip.js.map +1 -0
- package/dist/ExecutiveDashboard/components/BarChart/types.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/types.js.map +1 -0
- package/dist/ExecutiveDashboard/components/BarChart/utils.js +2 -0
- package/dist/ExecutiveDashboard/components/BarChart/utils.js.map +1 -0
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.js +1 -1
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js +2 -0
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js.map +1 -0
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js +2 -0
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js.map +1 -0
- package/dist/ExecutiveDashboard/components/DashboardDateFilter/datePreset.js +1 -1
- package/dist/ExecutiveDashboard/components/DropDowns/CustomMultiSelect.js +1 -1
- package/dist/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/Graph.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/Seperator.js +2 -0
- package/dist/ExecutiveDashboard/components/Graph/Seperator.js.map +1 -0
- package/dist/ExecutiveDashboard/components/MetricCard/MetricCard.js +1 -1
- package/dist/ExecutiveDashboard/components/PieChart/PieChart.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChart.js.map +1 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartEmptyState.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartEmptyState.js.map +1 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartSkeleton.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartSkeleton.js.map +1 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartTooltip.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/PieChartTooltip.js.map +1 -0
- package/dist/ExecutiveDashboard/components/PieChart/types.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/types.js.map +1 -0
- package/dist/ExecutiveDashboard/components/PieChart/utils.js +2 -0
- package/dist/ExecutiveDashboard/components/PieChart/utils.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Table/TableCard.js +1 -1
- package/dist/ExecutiveDashboard/components/TablePage/TablePage.js +2 -0
- package/dist/ExecutiveDashboard/components/TablePage/TablePage.js.map +1 -0
- package/dist/ExecutiveDashboard/components/common/ConfirmationModal.js +2 -0
- package/dist/ExecutiveDashboard/components/common/ConfirmationModal.js.map +1 -0
- package/dist/ExecutiveDashboard/components/ui/chart.js +1 -1
- package/dist/ExecutiveDashboard/hooks/useVisibilityPolling.js +2 -0
- package/dist/ExecutiveDashboard/hooks/useVisibilityPolling.js.map +1 -0
- package/dist/RecordDashboard/RecordApi/RecordDashboardApi.js +1 -1
- package/dist/RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.js +1 -1
- package/dist/RecordDashboard/RecordComponents/RecordDashboard.js +1 -1
- package/dist/RecordDashboard/RecordDashboardWrapper.js +1 -1
- package/dist/RecordDashboard/RecordUtils/RecordTableColumns.js +1 -1
- package/dist/cjs/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/cjs/ExecutiveDashboard/api/dashboardApi.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChart.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChart.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartEmptyState.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartEmptyState.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartSkeleton.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartSkeleton.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartTooltip.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/BarChartTooltip.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/types.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/types.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/utils.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/BarChart/utils.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardDateFilter/datePreset.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/DropDowns/CustomMultiSelect.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/Graph.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/Seperator.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Graph/Seperator.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/MetricCard/MetricCard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChart.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChart.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartEmptyState.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartEmptyState.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartSkeleton.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartSkeleton.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartTooltip.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/PieChartTooltip.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/types.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/types.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/utils.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/PieChart/utils.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Table/TableCard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/TablePage/TablePage.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/TablePage/TablePage.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/common/ConfirmationModal.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/common/ConfirmationModal.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/ui/chart.js +1 -1
- package/dist/cjs/ExecutiveDashboard/hooks/useVisibilityPolling.js +2 -0
- package/dist/cjs/ExecutiveDashboard/hooks/useVisibilityPolling.js.map +1 -0
- package/dist/cjs/RecordDashboard/RecordApi/RecordDashboardApi.js +1 -1
- package/dist/cjs/RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.js +1 -1
- package/dist/cjs/RecordDashboard/RecordComponents/RecordDashboard.js +1 -1
- package/dist/cjs/RecordDashboard/RecordDashboardWrapper.js +1 -1
- package/dist/cjs/RecordDashboard/RecordUtils/RecordTableColumns.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/@kurkle/color/dist/color.esm.js +9 -0
- package/dist/cjs/node_modules/@kurkle/color/dist/color.esm.js.map +1 -0
- package/dist/cjs/node_modules/chart.js/auto/auto.js +2 -0
- package/dist/cjs/node_modules/chart.js/auto/auto.js.map +1 -0
- package/dist/cjs/node_modules/chart.js/dist/chart.js +8 -0
- package/dist/cjs/node_modules/chart.js/dist/chart.js.map +1 -0
- package/dist/cjs/node_modules/chart.js/dist/chunks/helpers.dataset.js +8 -0
- package/dist/cjs/node_modules/chart.js/dist/chunks/helpers.dataset.js.map +1 -0
- package/dist/cjs/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js +2 -0
- package/dist/cjs/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js.map +1 -0
- package/dist/cjs/styles.css +1 -1
- package/dist/index.js +1 -1
- package/dist/node_modules/@kurkle/color/dist/color.esm.js +8 -0
- package/dist/node_modules/@kurkle/color/dist/color.esm.js.map +1 -0
- package/dist/node_modules/chart.js/auto/auto.js +2 -0
- package/dist/node_modules/chart.js/auto/auto.js.map +1 -0
- package/dist/node_modules/chart.js/dist/chart.js +8 -0
- package/dist/node_modules/chart.js/dist/chart.js.map +1 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.dataset.js +8 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.dataset.js.map +1 -0
- package/dist/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js +8 -0
- package/dist/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/TestExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/api/dashboardApi.d.ts +2 -1
- package/dist/types/ExecutiveDashboard/api/dashboardApi.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChart.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChart.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartEmptyState.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartEmptyState.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartSkeleton.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartSkeleton.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartTooltip.d.ts +13 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/BarChartTooltip.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/types.d.ts +170 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/types.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/utils.d.ts +48 -0
- package/dist/types/ExecutiveDashboard/components/BarChart/utils.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.d.ts +8 -1
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.d.ts +33 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/datePreset.d.ts +47 -0
- package/dist/types/ExecutiveDashboard/components/DashboardDateFilter/datePreset.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/DropDowns/CustomMultiSelect.d.ts +1 -3
- package/dist/types/ExecutiveDashboard/components/DropDowns/CustomMultiSelect.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts +18 -2
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/Graph.d.ts +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/Graph.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/LineChart.d.ts +4 -2
- package/dist/types/ExecutiveDashboard/components/Graph/LineChart.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/Seperator.d.ts +7 -0
- package/dist/types/ExecutiveDashboard/components/Graph/Seperator.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Graph/types.d.ts +61 -0
- package/dist/types/ExecutiveDashboard/components/Graph/types.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/MetricCard/MetricCard.d.ts +13 -1
- package/dist/types/ExecutiveDashboard/components/MetricCard/MetricCard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChart.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChart.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartEmptyState.d.ts +11 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartEmptyState.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartSkeleton.d.ts +12 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartSkeleton.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartTooltip.d.ts +13 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/PieChartTooltip.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/types.d.ts +148 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/types.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/utils.d.ts +39 -0
- package/dist/types/ExecutiveDashboard/components/PieChart/utils.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Table/TableCard.d.ts +11 -1
- package/dist/types/ExecutiveDashboard/components/Table/TableCard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/TablePage/TablePage.d.ts +42 -0
- package/dist/types/ExecutiveDashboard/components/TablePage/TablePage.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/common/Accordion.d.ts +34 -0
- package/dist/types/ExecutiveDashboard/components/common/Accordion.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/common/ConfirmationModal.d.ts +17 -0
- package/dist/types/ExecutiveDashboard/components/common/ConfirmationModal.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/ui/chart.d.ts +1 -0
- package/dist/types/ExecutiveDashboard/components/ui/chart.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/constant/index.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/hooks/useVisibilityPolling.d.ts +12 -0
- package/dist/types/ExecutiveDashboard/hooks/useVisibilityPolling.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/types/index.d.ts +299 -1
- package/dist/types/ExecutiveDashboard/types/index.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordApi/RecordDashboardApi.d.ts +5 -2
- package/dist/types/RecordDashboard/RecordApi/RecordDashboardApi.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.d.ts +1 -1
- package/dist/types/RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordComponents/RecordDashboard.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordDashboardWrapper.d.ts +1 -1
- package/dist/types/RecordDashboard/RecordDashboardWrapper.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordTypes/index.d.ts +33 -4
- package/dist/types/RecordDashboard/RecordTypes/index.d.ts.map +1 -1
- package/dist/types/RecordDashboard/RecordUtils/RecordTableColumns.d.ts +13 -1
- package/dist/types/RecordDashboard/RecordUtils/RecordTableColumns.d.ts.map +1 -1
- package/dist/types/RecordDashboard/TestRecordDashbaord.d.ts.map +1 -1
- package/dist/types/index.d.ts +35 -3
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -25
- package/dist/HumanIntelligence/HumanChangesTableWrapper.js +0 -2
- package/dist/HumanIntelligence/HumanChangesTableWrapper.js.map +0 -1
- package/dist/HumanIntelligence/components/CitationContent/CitationContent.js +0 -2
- package/dist/HumanIntelligence/components/CitationContent/CitationContent.js.map +0 -1
- package/dist/HumanIntelligence/components/CitationContent/CitationContent.module.css.js +0 -2
- package/dist/HumanIntelligence/components/CitationContent/CitationContent.module.css.js.map +0 -1
- package/dist/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js +0 -2
- package/dist/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js.map +0 -1
- package/dist/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.module.css.js +0 -2
- package/dist/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.module.css.js.map +0 -1
- package/dist/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js +0 -2
- package/dist/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js.map +0 -1
- package/dist/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.module.css.js +0 -2
- package/dist/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.module.css.js.map +0 -1
- package/dist/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js +0 -2
- package/dist/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js.map +0 -1
- package/dist/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.module.css.js +0 -2
- package/dist/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.module.css.js.map +0 -1
- package/dist/HumanIntelligence/components/LogFilters/LogFilterDropdown.js +0 -2
- package/dist/HumanIntelligence/components/LogFilters/LogFilterDropdown.js.map +0 -1
- package/dist/HumanIntelligence/components/LogFilters/LogFilters.js +0 -2
- package/dist/HumanIntelligence/components/LogFilters/LogFilters.js.map +0 -1
- package/dist/HumanIntelligence/components/LogTable/LogTable.js +0 -2
- package/dist/HumanIntelligence/components/LogTable/LogTable.js.map +0 -1
- package/dist/HumanIntelligence/components/PatternDetails/PatternDetails.js +0 -2
- package/dist/HumanIntelligence/components/PatternDetails/PatternDetails.js.map +0 -1
- package/dist/HumanIntelligence/components/PatternDetails/PatternDetails.module.css.js +0 -2
- package/dist/HumanIntelligence/components/PatternDetails/PatternDetails.module.css.js.map +0 -1
- package/dist/HumanIntelligence/components/Shared/ReusableTable.js +0 -2
- package/dist/HumanIntelligence/components/Shared/ReusableTable.js.map +0 -1
- package/dist/HumanIntelligence/components/Shared/ReusableTable.module.css.js +0 -2
- package/dist/HumanIntelligence/components/Shared/ReusableTable.module.css.js.map +0 -1
- package/dist/HumanIntelligence/hooks/useHighlightNavigation.js +0 -2
- package/dist/HumanIntelligence/hooks/useHighlightNavigation.js.map +0 -1
- package/dist/HumanIntelligence/hooks/useHumanChangesData.js +0 -2
- package/dist/HumanIntelligence/hooks/useHumanChangesData.js.map +0 -1
- package/dist/HumanIntelligence/hooks/useHumanIntelligenceController.js +0 -2
- package/dist/HumanIntelligence/hooks/useHumanIntelligenceController.js.map +0 -1
- package/dist/HumanIntelligence/styles/HumanIntelligence.module.css.js +0 -2
- package/dist/HumanIntelligence/styles/HumanIntelligence.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/HumanChangesTableWrapper.js +0 -2
- package/dist/cjs/HumanIntelligence/HumanChangesTableWrapper.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/CitationContent/CitationContent.js +0 -2
- package/dist/cjs/HumanIntelligence/components/CitationContent/CitationContent.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/CitationContent/CitationContent.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/CitationContent/CitationContent.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js +0 -2
- package/dist/cjs/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js +0 -2
- package/dist/cjs/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js +0 -2
- package/dist/cjs/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/LogFilters/LogFilterDropdown.js +0 -2
- package/dist/cjs/HumanIntelligence/components/LogFilters/LogFilterDropdown.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/LogFilters/LogFilters.js +0 -2
- package/dist/cjs/HumanIntelligence/components/LogFilters/LogFilters.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/LogTable/LogTable.js +0 -2
- package/dist/cjs/HumanIntelligence/components/LogTable/LogTable.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/PatternDetails/PatternDetails.js +0 -2
- package/dist/cjs/HumanIntelligence/components/PatternDetails/PatternDetails.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/PatternDetails/PatternDetails.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/PatternDetails/PatternDetails.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/Shared/ReusableTable.js +0 -2
- package/dist/cjs/HumanIntelligence/components/Shared/ReusableTable.js.map +0 -1
- package/dist/cjs/HumanIntelligence/components/Shared/ReusableTable.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/components/Shared/ReusableTable.module.css.js.map +0 -1
- package/dist/cjs/HumanIntelligence/hooks/useHighlightNavigation.js +0 -2
- package/dist/cjs/HumanIntelligence/hooks/useHighlightNavigation.js.map +0 -1
- package/dist/cjs/HumanIntelligence/hooks/useHumanChangesData.js +0 -2
- package/dist/cjs/HumanIntelligence/hooks/useHumanChangesData.js.map +0 -1
- package/dist/cjs/HumanIntelligence/hooks/useHumanIntelligenceController.js +0 -2
- package/dist/cjs/HumanIntelligence/hooks/useHumanIntelligenceController.js.map +0 -1
- package/dist/cjs/HumanIntelligence/styles/HumanIntelligence.module.css.js +0 -2
- package/dist/cjs/HumanIntelligence/styles/HumanIntelligence.module.css.js.map +0 -1
- package/dist/types/HumanIntelligence/HumanChangesTableWrapper.d.ts +0 -108
- package/dist/types/HumanIntelligence/HumanChangesTableWrapper.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/TestHumanIntelligence.d.ts +0 -3
- package/dist/types/HumanIntelligence/TestHumanIntelligence.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/CitationContent/CitationContent.d.ts +0 -26
- package/dist/types/HumanIntelligence/components/CitationContent/CitationContent.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.d.ts +0 -36
- package/dist/types/HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.d.ts +0 -12
- package/dist/types/HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.d.ts +0 -40
- package/dist/types/HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/LogFilters/LogFilterDropdown.d.ts +0 -27
- package/dist/types/HumanIntelligence/components/LogFilters/LogFilterDropdown.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/LogFilters/LogFilters.d.ts +0 -38
- package/dist/types/HumanIntelligence/components/LogFilters/LogFilters.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/LogFilters/LogFiltersSidebar.d.ts +0 -38
- package/dist/types/HumanIntelligence/components/LogFilters/LogFiltersSidebar.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/LogTable/LogTable.d.ts +0 -73
- package/dist/types/HumanIntelligence/components/LogTable/LogTable.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/PatternDetails/PatternDetails.d.ts +0 -11
- package/dist/types/HumanIntelligence/components/PatternDetails/PatternDetails.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/components/Shared/ReusableTable.d.ts +0 -18
- package/dist/types/HumanIntelligence/components/Shared/ReusableTable.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/hooks/useHighlightNavigation.d.ts +0 -42
- package/dist/types/HumanIntelligence/hooks/useHighlightNavigation.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/hooks/useHumanChangesData.d.ts +0 -146
- package/dist/types/HumanIntelligence/hooks/useHumanChangesData.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/hooks/useHumanIntelligenceController.d.ts +0 -48
- package/dist/types/HumanIntelligence/hooks/useHumanIntelligenceController.d.ts.map +0 -1
- package/dist/types/HumanIntelligence/index.d.ts +0 -21
- package/dist/types/HumanIntelligence/index.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r,__rest as t,__assign as n,__spreadArray as a}from"../_virtual/_tslib.js";import{jsx as o,Fragment as i,jsxs as l}from"react/jsx-runtime";import u,{useState as d,useRef as s,useCallback as c,useEffect as v}from"react";import{ExecutiveDashboard as f}from"./components/ExecutiveDashboard.js";import{DATE_PRESETS as b}from"./components/DashboardDateFilter/datePreset.js";import{DashboardSkeleton as h}from"./components/DashboardSkeleton/DashboardSkeleton.js";import{fetchUIConfig as p,fetchDashboardData as g,fetchTableData as m}from"./api/dashboardApi.js";function D(D){var y=this,E=D.baseUrl,S=void 0===E?"https://dev.appmod.ai":E,w=D.configId,C=D.graphEmptyState,F=D.tables,A=D.tableLayout,j=D.sectionOrder,M=D.hiddenSections,R=D.fetchUIConfig,T=D.fetchDashboardData,x=D.fetchTableData,L=D.initialStartDate,O=D.initialEndDate,I=D.onDateChange,U=D.onFiltersApplied,k=D.renderLoading,K=D.renderError,P=null!=R?R:p,N=null!=T?T:g,V=null!=x?x:m,_=d(null),z=_[0],B=_[1],H=d(null),q=H[0],G=H[1],J=d(!0),Q=J[0],W=J[1],X=d(!0),Y=X[0],Z=X[1],$=d(null),ee=$[0],re=$[1],te=d(!1),ne=te[0],ae=te[1],oe=d({}),ie=oe[0],le=oe[1],ue=d({}),de=ue[0],se=ue[1],ce=d({}),ve=ce[0],fe=ce[1],be=d(null),he=be[0],pe=be[1],ge=u.useRef(null),me=u.useRef(!1),De=s(null),ye=s(null),Ee=s({}),Se=s(new Set),we=d({}),Ce=we[0],Fe=we[1],Ae=c(function(){return e(y,void 0,void 0,function(){var e,t,n,a,o,i,l,u,d,s,c,v,f,h;return r(this,function(r){switch(r.label){case 0:W(!0),re(null),null===(l=De.current)||void 0===l||l.abort(),e=new AbortController,De.current=e,r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,P({configId:w,baseUrl:S},e.signal)];case 2:return t=r.sent(),B(t),n={},null===(s=null===(d=null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.graphBuilder)||void 0===d?void 0:d.tiers)||void 0===s||s.forEach(function(e){e.plotOptions.length>0&&(n[e.key]=e.plotOptions[0].value)}),le(n),a={},null===(v=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.sidebarFilters)||void 0===v||v.forEach(function(e){a[e.schemaFilterName]="Multi select"===e.type?[]:""}),se(a),fe(a),me.current||(o=L&&O?{startDate:L,endDate:O}:(p=null===(h=null===(f=null==t?void 0:t.data)||void 0===f?void 0:f.dateFilters)||void 0===h?void 0:h.defaultPreset,(g=Object.values(b).find(function(e){return e.value===p}))&&"getRange"in g?g.getRange():null))&&(me.current=!0,ge.current={start:o.startDate.getTime(),end:o.endDate.getTime()},pe({start:o.startDate,end:o.endDate})),[3,5];case 3:return"AbortError"===(null==(i=r.sent())?void 0:i.name)?[2]:(re(i),[3,5]);case 4:return De.current===e&&W(!1),[7];case 5:return[2]}var p,g})})},[w,S,P,L,O]);v(function(){return Ae(),function(){var e;return null===(e=De.current)||void 0===e?void 0:e.abort()}},[Ae]);var je=c(function(){return e(y,void 0,void 0,function(){var e,t,n,a,o;return r(this,function(r){switch(r.label){case 0:if(!he)return[2];null===(o=ye.current)||void 0===o||o.abort(),e=new AbortController,ye.current=e,Z(!0),re(null),r.label=1;case 1:return r.trys.push([1,3,4,5]),t={startDate:he.start,endDate:he.end,filters:ve},[4,N({configId:w,baseUrl:S},t,e.signal)];case 2:return n=r.sent(),G(n),Fe({}),[3,5];case 3:return"AbortError"===(null==(a=r.sent())?void 0:a.name)?[2]:(re(a),[3,5]);case 4:return ye.current===e&&Z(!1),[7];case 5:return[2]}})})},[w,S,he,ve,N]),Me=c(function(t,o){return e(y,void 0,void 0,function(){var e,i,l,u,d,s,c;return r(this,function(r){switch(r.label){case 0:if(!he||!Se.current.has(t)||Ee.current[t])return[2];e=new AbortController,Ee.current[t]=e,i=function(){return!Se.current.has(t)||e.signal.aborted||Ee.current[t]!==e},Fe(function(e){var r,a,o,i,l,u,d,s;return n(n({},e),((r={})[t]={rows:null!==(o=null===(a=e[t])||void 0===a?void 0:a.rows)&&void 0!==o?o:[],cursor:null===(i=e[t])||void 0===i?void 0:i.cursor,hasMore:null!==(u=null===(l=e[t])||void 0===l?void 0:l.hasMore)&&void 0!==u&&u,loading:!0,loaded:null!==(s=null===(d=e[t])||void 0===d?void 0:d.loaded)&&void 0!==s&&s},r))}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,V({configId:w,baseUrl:S},n({startDate:he.start,endDate:he.end,filters:ve,tableKey:t,pageSize:20},o?{cursor:o}:{}),e.signal)];case 2:return l=r.sent(),u=null!==(c=null===(s=l.table)||void 0===s?void 0:s[t])&&void 0!==c?c:[],i()?[2]:(Fe(function(e){var r,o,i=e[t];return i?n(n({},e),((r={})[t]={rows:a(a([],i.rows,!0),u,!0),cursor:null!==(o=l.nextCursor)&&void 0!==o?o:void 0,hasMore:l.hasNext,loading:!1,loaded:!0},r)):e}),[3,5]);case 3:return"AbortError"===(null==(d=r.sent())?void 0:d.name)||i()?[2]:(Fe(function(e){var r;return e[t]?n(n({},e),((r={})[t]=n(n({},e[t]),{loading:!1,hasMore:!1}),r)):e}),[3,5]);case 4:return Ee.current[t]===e&&delete Ee.current[t],[7];case 5:return[2]}})})},[w,S,he,ve,V]),Re=c(function(e,r){var n;if(!r)return Se.current.delete(e),null===(n=Ee.current[e])||void 0===n||n.abort(),delete Ee.current[e],void Fe(function(r){var n=r,a=e;return n[a],t(n,["symbol"==typeof a?a:a+""])});Se.current.add(e),Me(e)},[Me]),Te=c(function(e){var r=Ce[e];(null==r?void 0:r.hasMore)&&!r.loading&&r.cursor&&Me(e,r.cursor)},[Me,Ce]);v(function(){return function(){Se.current.clear(),Object.values(Ee.current).forEach(function(e){return e.abort()})}},[]),v(function(){return je(),function(){var e;return null===(e=ye.current)||void 0===e?void 0:e.abort()}},[je]);var xe=c(function(e){if((null==e?void 0:e.startDate)&&(null==e?void 0:e.endDate)){var r=e.startDate.getTime(),t=e.endDate.getTime();ge.current&&ge.current.start===r&&ge.current.end===t||(ge.current={start:r,end:t},pe({start:e.startDate,end:e.endDate}))}null==I||I(e)},[I]),Le=Q||Y&&!q;return ee?K?o(i,{children:K(ee,Ae)}):l("div",n({style:{padding:24,color:"#b91c1c"}},{children:["Failed to load dashboard: ",ee.message,o("button",n({onClick:Ae,style:{marginLeft:12}},{children:"Retry"}))]})):!Le&&z&&q&&he?o(f,{uiConfig:z,data:q,dataLoading:Y,startDate:he.start,endDate:he.end,onDateChange:xe,onRefresh:function(){je()},selectedKpis:ie,onKpiChange:function(e,r){le(function(t){var a;return n(n({},t),((a={})[e]=r,a))})},sidebarVisible:ne,onSidebarShow:function(){return ae(!0)},onSidebarHide:function(){return ae(!1)},filterValues:de,onFilterChange:function(e,r){se(function(t){var a;return n(n({},t),((a={})[e]=r,a))})},onFilterReset:function(){if(z){var e={};z.data.sidebarFilters.forEach(function(r){e[r.id]="multiSelect"===r.type?[]:""}),se(e)}},onFilterApply:function(){fe(de),ae(!1),null==U||U(de)},appliedFilters:ve,graphEmptyState:C,tables:F,tableLayout:A,sectionOrder:j,hiddenSections:M,tablePages:Ce,onTableExpand:Re,onTableLoadMore:Te}):k?o(i,{children:k()}):o(h,{})}export{D as ExecutiveDashboardWrapper,D as default};
|
|
1
|
+
import{__awaiter as n,__rest as e,__assign as r,__generator as t,__spreadArray as l}from"../_virtual/_tslib.js";import{jsx as o,Fragment as a,jsxs as i}from"react/jsx-runtime";import u,{useState as d,useRef as s,useMemo as c,useCallback as v,useEffect as f}from"react";import{ExecutiveDashboard as b}from"./components/ExecutiveDashboard.js";import{DATE_PRESETS as g}from"./components/DashboardDateFilter/datePreset.js";import{DashboardSkeleton as p}from"./components/DashboardSkeleton/DashboardSkeleton.js";import{fetchUIConfig as h,fetchCurrentConfigUIVersionFromRedis as m,fetchDashboardData as D,fetchTableData as E}from"./api/dashboardApi.js";import{useVisibilityPolling as C}from"./hooks/useVisibilityPolling.js";var y=1e4;function I(I){var w,F,P,S=this,A=I.baseUrl,R=void 0===A?"https://dev.appmod.ai":A,j=I.configId,M=I.graphEmptyState,k=I.tables,x=I.tableLayout,L=I.sectionOrder,O=I.hiddenSections,T=I.fetchUIConfig,U=I.fetchUIVersionFromRedis,N=I.fetchDashboardData,V=I.fetchTableData,K=I.initialStartDate,B=I.initialEndDate,_=I.onDateChange,z=I.onFiltersApplied,G=I.renderLoading,H=I.renderError,q=I.pollingConfigProp,J=I.metricCardConfig,Q=I.kpiCtaConfig,W=I.tableCtaConfig,X=null!=T?T:h,Y=null!=U?U:m,Z=null!=N?N:D,$=null!=V?V:E,nn=d(null),en=nn[0],rn=nn[1],tn=d(null),ln=tn[0],on=tn[1],an=d(!0),un=an[0],dn=an[1],sn=d(!0),cn=sn[0],vn=sn[1],fn=d(null),bn=fn[0],gn=fn[1],pn=d(!1),hn=pn[0],mn=pn[1],Dn=d({}),En=Dn[0],Cn=Dn[1],yn=d({}),In=yn[0],wn=yn[1],Fn=d({}),Pn=Fn[0],Sn=Fn[1],An=d(null),Rn=An[0],jn=An[1],Mn=u.useRef(null),kn=u.useRef(!1),xn=s(null),Ln=s(null),On=s({}),Tn=s(null),Un=s(new Set),Nn=s(!1),Vn=s(y),Kn=s(-1),Bn=s(!0),_n=d(null!==(F=null===(w=null==en?void 0:en.data)||void 0===w?void 0:w.dateFilters.defaultPreset)&&void 0!==F?F:"today"),zn=_n[0],Gn=_n[1],Hn=d(!1),qn=Hn[0],Jn=Hn[1],Qn=d({}),Wn=Qn[0],Xn=Qn[1],Yn=c(function(){var n,e;if(en){var r=en.data.dateFilters;return(null==r?void 0:r.pollingEnabled)&&(Vn.current=null!==(n=r.pollingInterval)&&void 0!==n?n:y),{pollingEnabled:null!==(e=Boolean("yes"===(null==r?void 0:r.pollingEnabled)))&&void 0!==e&&e,pollingInterval:y,maxErrorInterval:5e4,backoffMultiplier:1.5}}},[en]),Zn=c(function(){return null!=q?q:Yn},[q,Yn]),$n=function(n){var e=Object.values(g).find(function(e){return e.value===n});return e&&"getRange"in e?e.getRange():null},ne=v(function(){return n(S,void 0,void 0,function(){var n,e,r,l,o,a,i,u,d,s,c,v,f,b;return t(this,function(t){switch(t.label){case 0:dn(!0),gn(null),null===(i=xn.current)||void 0===i||i.abort(),n=new AbortController,xn.current=n,t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,X({configId:j,baseUrl:R},n.signal)];case 2:return e=t.sent(),rn(e),r={},null===(s=null===(d=null===(u=null==e?void 0:e.data)||void 0===u?void 0:u.graphBuilder)||void 0===d?void 0:d.tiers)||void 0===s||s.forEach(function(n){n.plotOptions.length>0&&(r[n.key]=n.plotOptions[0].value)}),Cn(r),l={},null===(v=null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.sidebarFilters)||void 0===v||v.forEach(function(n){l[n.schemaFilterName]="Multi select"===n.type?[]:""}),wn(l),Sn(l),kn.current||(o=K&&B?{startDate:K,endDate:B}:$n(null===(b=null===(f=null==e?void 0:e.data)||void 0===f?void 0:f.dateFilters)||void 0===b?void 0:b.defaultPreset))&&(kn.current=!0,Mn.current={start:o.startDate.getTime(),end:o.endDate.getTime()},jn({start:o.startDate,end:o.endDate})),[3,5];case 3:return"AbortError"===(null==(a=t.sent())?void 0:a.name)?[2]:(gn(a),[3,5]);case 4:return xn.current===n&&dn(!1),[7];case 5:return[2]}})})},[j,R,X,K,B]),ee=v(function(){return n(S,void 0,void 0,function(){var n,e,r,l,o;return t(this,function(t){switch(t.label){case 0:if(Nn.current)return[3,7];Nn.current=!0,console.log("----- POLLING API ----"),null===(o=Tn.current)||void 0===o||o.abort(),n=new AbortController,Tn.current=n,t.label=1;case 1:return t.trys.push([1,5,6,7]),[4,Y({configId:j,baseUrl:R},n.signal)];case 2:return(null==(e=t.sent())?void 0:e.timestamp)&&parseInt(null==e?void 0:e.timestamp)>Kn.current?(r=$n(zn),"custom"===zn&&Rn&&(r={startDate:null==Rn?void 0:Rn.start,endDate:null==Rn?void 0:Rn.end}),console.log("loadData ranges: ",{selectedPreset:zn,currentRange:r}),[4,re(r).then(function(){return Kn.current=parseInt(e.timestamp)})]):[3,4];case 3:t.sent(),t.label=4;case 4:return Bn.current=!1,[3,7];case 5:return"AbortError"===(null==(l=t.sent())?void 0:l.name)?[2]:(console.error("Something went wrong while fetching version from Redis"),[3,7]);case 6:return Nn.current=!1,[7];case 7:return[2]}})})},[zn,Rn,Y]);C((null==Yn?void 0:Yn.pollingEnabled)&&qn,Vn.current,ee,[Zn,qn,ee]),f(function(){return ne(),function(){var n;return null===(n=xn.current)||void 0===n?void 0:n.abort()}},[ne]),f(function(){if(Yn&&Yn.pollingEnabled){var n=Yn.pollingInterval;"number"==typeof n&&!isNaN(n)&&n>0&&(Vn.current=n)}},[Yn]);var re=v(function(e){return n(S,void 0,void 0,function(){var n,r,l,o,a,i,u,d;return t(this,function(t){switch(t.label){case 0:if(!Rn)return[2];null===(a=Ln.current)||void 0===a||a.abort(),n=new AbortController,Ln.current=n,Bn.current&&vn(!0),gn(null),console.log("loadData ranges: ",{selectedPreset:zn,currentRange:e,dateRange:Rn}),t.label=1;case 1:return t.trys.push([1,3,4,5]),r={startDate:(null==Yn?void 0:Yn.pollingEnabled)&&e&&"custom"!==zn?e.startDate:Rn.start,endDate:(null==Yn?void 0:Yn.pollingEnabled)&&e&&"custom"!==zn?e.endDate:Rn.end,filters:Pn},[4,Z({configId:j,baseUrl:R},r,n.signal)];case 2:return l=t.sent(),on(l),(null==Yn?void 0:Yn.pollingEnabled)||Xn({}),Vn.current&&(null==Zn?void 0:Zn.pollingEnabled)&&(null==Yn?void 0:Yn.pollingInterval)&&(Vn.current=null!==(i=null==Zn?void 0:Zn.pollingInterval)&&void 0!==i?i:y,Bn.current=!1),[3,5];case 3:return"AbortError"===(null==(o=t.sent())?void 0:o.name)?[2]:(gn(o),Vn.current&&(null==Zn?void 0:Zn.maxErrorInterval)&&(Vn.current=Math.min(Vn.current*(null!==(u=null==Yn?void 0:Yn.backoffMultiplier)&&void 0!==u?u:1.5),null!==(d=null==Yn?void 0:Yn.maxErrorInterval)&&void 0!==d?d:5e4)),[3,5]);case 4:return Ln.current===n&&vn(!1),[7];case 5:return[2]}})})},[j,R,Rn,Pn,Z]),te=v(function(e,o){return n(S,void 0,void 0,function(){var n,a,i,u,d,s,c;return t(this,function(t){switch(t.label){case 0:if(!Rn||!Un.current.has(e)||On.current[e])return[2];n=new AbortController,On.current[e]=n,a=function(){return!Un.current.has(e)||n.signal.aborted||On.current[e]!==n},Xn(function(n){var t,l,o,a,i,u,d,s;return r(r({},n),((t={})[e]={rows:null!==(o=null===(l=n[e])||void 0===l?void 0:l.rows)&&void 0!==o?o:[],cursor:null===(a=n[e])||void 0===a?void 0:a.cursor,hasMore:null!==(u=null===(i=n[e])||void 0===i?void 0:i.hasMore)&&void 0!==u&&u,loading:!0,loaded:null!==(s=null===(d=n[e])||void 0===d?void 0:d.loaded)&&void 0!==s&&s},t))}),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,$({configId:j,baseUrl:R},r({startDate:Rn.start,endDate:Rn.end,filters:Pn,tableKey:e,pageSize:20},o?{cursor:o}:{}),n.signal)];case 2:return i=t.sent(),u=null!==(c=null===(s=i.table)||void 0===s?void 0:s[e])&&void 0!==c?c:[],a()?[2]:(Xn(function(n){var t,o,a=n[e];return a?r(r({},n),((t={})[e]={rows:l(l([],a.rows,!0),u,!0),cursor:null!==(o=i.nextCursor)&&void 0!==o?o:void 0,hasMore:i.hasNext,loading:!1,loaded:!0},t)):n}),[3,5]);case 3:return"AbortError"===(null==(d=t.sent())?void 0:d.name)||a()?[2]:(Xn(function(n){var t;return n[e]?r(r({},n),((t={})[e]=r(r({},n[e]),{loading:!1,hasMore:!1}),t)):n}),[3,5]);case 4:return On.current[e]===n&&delete On.current[e],[7];case 5:return[2]}})})},[j,R,Rn,Pn,$]),le=v(function(n,r){var t;if(!r)return Un.current.delete(n),null===(t=On.current[n])||void 0===t||t.abort(),delete On.current[n],void Xn(function(r){var t=r,l=n;return t[l],e(t,["symbol"==typeof l?l:l+""])});Un.current.add(n),te(n)},[te]),oe=v(function(n){var e=Wn[n];(null==e?void 0:e.hasMore)&&!e.loading&&e.cursor&&te(n,e.cursor)},[te,Wn]);f(function(){return function(){Un.current.clear(),Object.values(On.current).forEach(function(n){return n.abort()})}},[]),f(function(){return re(),function(){var n;return null===(n=Ln.current)||void 0===n?void 0:n.abort()}},[re]),f(function(){return function(){var n;return null===(n=Tn.current)||void 0===n?void 0:n.abort()}},[]),f(function(){!function(n){var e=Object.values(g).find(function(e){return e.value===n}),r=!(!e||!("pollingEnabled"in e)||!1===e.pollingEnabled);Jn(r)}(zn)},[zn]),f(function(){var n,e;(null===(n=null==en?void 0:en.data)||void 0===n?void 0:n.dateFilters.defaultPreset)&&Gn(null===(e=null==en?void 0:en.data)||void 0===e?void 0:e.dateFilters.defaultPreset)},[null===(P=null==en?void 0:en.data)||void 0===P?void 0:P.dateFilters.defaultPreset]);var ae=v(function(n){if((null==n?void 0:n.startDate)&&(null==n?void 0:n.endDate)){var e=n.startDate.getTime(),r=n.endDate.getTime();Mn.current&&Mn.current.start===e&&Mn.current.end===r||(Mn.current={start:e,end:r},jn({start:n.startDate,end:n.endDate}))}null==_||_(n),vn(!0)},[_]),ie=un||cn&&!ln;return bn?H?o(a,{children:H(bn,ne)}):i("div",r({style:{padding:24,color:"#b91c1c"}},{children:["Failed to load dashboard: ",bn.message,o("button",r({onClick:ne,style:{marginLeft:12}},{children:"Retry"}))]})):!ie&&en&&ln&&Rn?(console.log("pollingEnabled: ",null==Yn?void 0:Yn.pollingEnabled,qn),o(b,{uiConfig:en,data:ln,dataLoading:cn,startDate:Rn.start,endDate:Rn.end,onDateChange:ae,onRefresh:function(){re(),vn(!0)},selectedKpis:En,onKpiChange:function(n,e){Cn(function(t){var l;return r(r({},t),((l={})[n]=e,l))})},sidebarVisible:hn,onSidebarShow:function(){return mn(!0)},onSidebarHide:function(){return mn(!1)},filterValues:In,onFilterChange:function(n,e){wn(function(t){var l;return r(r({},t),((l={})[n]=e,l))})},onFilterReset:function(){if(en){var n={};en.data.sidebarFilters.forEach(function(e){n[e.id]="multiSelect"===e.type?[]:""}),wn(n)}},onFilterApply:function(){Sn(In),mn(!1),null==z||z(In)},appliedFilters:Pn,graphEmptyState:M,tables:k,tableLayout:x,sectionOrder:L,hiddenSections:O,tablePages:Wn,onTableExpand:le,onTableLoadMore:oe,pollingEnabled:(null==Yn?void 0:Yn.pollingEnabled)&&qn,selectedPreset:zn,handlePresetChange:function(n){Gn(n)},metricCardConfig:J,kpiCtaConfig:Q,tableCtaConfig:W})):G?o(a,{children:G()}):o(p,{})}export{I as ExecutiveDashboardWrapper,I as default};
|
|
2
2
|
//# sourceMappingURL=ExecutiveDashboardWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__extends as t,__awaiter as
|
|
1
|
+
import{__extends as t,__awaiter as e,__generator as r,__assign as n}from"../../_virtual/_tslib.js";var i=function(e){function r(t,r){var n=e.call(this,t)||this;return n.name="DashboardApiError",n.status=r,n}return t(r,e),r}(Error),a=function(t){return t.replace(/\/+$/,"")};function s(t,n,a){var s;return e(this,void 0,void 0,function(){var e,o;return r(this,function(r){switch(r.label){case 0:return[4,fetch(t,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n),signal:a})];case 1:if(!(e=r.sent()).ok)throw new i("Request failed with status ".concat(e.status),e.status);return[4,e.json()];case 2:if(!(o=r.sent()).success)throw new i((null===(s=o.error)||void 0===s?void 0:s.errorMessage)||"Request failed");return[2,o.data]}})})}function o(t,n){var a;return e(this,void 0,void 0,function(){var e,s;return r(this,function(r){switch(r.label){case 0:return[4,fetch(t,{method:"GET",headers:{accept:"application/json"},signal:n})];case 1:if(!(e=r.sent()).ok)throw new i("Request failed with status ".concat(e.status),e.status);return[4,e.json()];case 2:if(!(s=r.sent()).success)throw new i((null===(a=s.error)||void 0===a?void 0:a.errorMessage)||"Request failed");return[2,s.data]}})})}function c(t,n){var i=t.configId,o=t.baseUrl,c=void 0===o?"":o;return e(this,void 0,void 0,function(){return r(this,function(t){return[2,s("".concat(a(c),"/federated/filters/ui"),{config_id:i},n)]})})}function u(t,n){var i=t.configId,o=t.baseUrl,c=void 0===o?"":o;return e(this,void 0,void 0,function(){var t;return r(this,function(e){switch(e.label){case 0:return[4,s("".concat(a(c),"/federated/filters/distinct-value"),{config_id:i},n)];case 1:return[2,(null==(t=e.sent())?void 0:t.sidebarFilters)||{}]}})})}function d(t,i){return e(this,void 0,void 0,function(){var e,a,s;return r(this,function(r){switch(r.label){case 0:return[4,Promise.all([c(t,i),u(t,i)])];case 1:return e=r.sent(),a=e[0],s=e[1],[2,{data:n(n({},a),{sidebarFilters:(a.sidebarFilters||[]).map(function(t){return n(n({},t),{options:s[t.schemaFilterName]||[]})})})}]}})})}function f(t,n){var i=t.configId,s=void 0===i?"":i,c=t.baseUrl,u=void 0===c?"":c;return e(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,o("".concat(a(null!=u?u:""),"/federated/filters/dashboard/").concat(s,"/last-updated/"),n)];case 1:return[2,t.sent()]}})})}function l(t){void 0===t&&(t={});var e={};return Object.entries(t).forEach(function(t){var r=t[0],n=t[1];Array.isArray(n)?n.length>0&&(e[r]=n):""!==n&&null!=n&&(e[r]=[n])}),e}function v(t,n,i){var o=t.configId,c=t.baseUrl,u=void 0===c?"":c;return e(this,void 0,void 0,function(){var t;return r(this,function(e){return t={config_id:o,dateFilters:{startDate:n.startDate?n.startDate.toISOString():"",endDate:n.endDate?n.endDate.toISOString():""},sidebarFilters:l(n.filters)},[2,s("".concat(a(u),"/federated/filters/get-data"),t,i)]})})}function h(t,i,o){var c,u=t.configId,d=t.baseUrl,f=void 0===d?"":d;return e(this,void 0,void 0,function(){return r(this,function(t){return[2,s("".concat(a(f),"/federated/filters/table-data"),n({config_id:u,dateFilters:{startDate:i.startDate?i.startDate.toISOString():"",endDate:i.endDate?i.endDate.toISOString():""},sidebarFilters:l(i.filters),tableKey:i.tableKey,pageSize:null!==(c=i.pageSize)&&void 0!==c?c:20},i.cursor?{cursor:i.cursor}:{}),o)]})})}export{i as DashboardApiError,f as fetchCurrentConfigUIVersionFromRedis,v as fetchDashboardData,h as fetchTableData,d as fetchUIConfig};
|
|
2
2
|
//# sourceMappingURL=dashboardApi.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as l,__spreadArray as i}from"../../../_virtual/_tslib.js";import{jsx as n,jsxs as e,Fragment as t}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{BarChart as r,CartesianGrid as u,XAxis as d,YAxis as c,Bar as s,Cell as v}from"recharts";import{ChartContainer as m,ChartTooltip as h}from"../ui/chart.js";import{compactNumber as f}from"../../utils/index.js";import b from"./BarChartEmptyState.js";import p from"./BarChartSkeleton.js";import x from"./BarChartTooltip.js";import{DEFAULT_BAR_COLOR as y}from"./types.js";import{resolveBarColors as g,sumValues as _,withAlpha as k,wrapLabel as C,darken as N}from"./utils.js";var L=function(l){return"number"==typeof l&&Number.isFinite(l)};function S(i){var e,t,a,o=i.x,r=i.y,u=i.payload,d=i.fill,c=i.maxChars,s=i.maxLines,v=i.axis,m=i.formatTick,h=m?m(String(null!==(e=null==u?void 0:u.value)&&void 0!==e?e:""),null!==(t=null==u?void 0:u.index)&&void 0!==t?t:0):String(null!==(a=null==u?void 0:u.value)&&void 0!==a?a:""),f=C(h,c,s),b="x"===v,p=b?12:-13*(f.length-1)/2+4;return n("text",l({x:o,y:r,fill:d,fontSize:11,textAnchor:b?"middle":"end",className:"ellm-bar-chart__tick"},{children:f.map(function(i,e){return n("tspan",l({x:o,dy:0===e?p:13},{children:i}),e)})}))}function M(C){var M,w,z,A,B,j,F,T,G,O,V,W,E,H=C.data,R=C.title,I=C.description,K=C.icon,D=C.headerActions,Z=C.color,q=void 0===Z?y:Z,J=C.shadeMode,P=void 0===J?"rank":J,Q=C.yAxisLabel,U=C.xAxisLabel,X=C.xAxis,Y=C.yAxis,$=C.tooltip,ll=C.legend,il=C.config,nl=C.style,el=C.valueFormatter,tl=C.loading,al=C.emptyState,ol=C.onBarClick,rl=a(null),ul=rl[0],dl=rl[1],cl=null!==(M=null==nl?void 0:nl.chartHeight)&&void 0!==M?M:300,sl=null!==(w=null==nl?void 0:nl.gridColor)&&void 0!==w?w:"#eef0f4",vl=null!==(z=null==nl?void 0:nl.axisColor)&&void 0!==z?z:"#d7dbe3",ml=null!==(A=null==nl?void 0:nl.axisLabelColor)&&void 0!==A?A:"#6b7280",hl=null!==(B=null==nl?void 0:nl.tickColor)&&void 0!==B?B:"#9ca3af",fl=null!==(j=null==nl?void 0:nl.fontFamily)&&void 0!==j?j:"Inter, system-ui, -apple-system, sans-serif",bl="horizontal"===(null==il?void 0:il.orientation),pl=null!==(F=null==il?void 0:il.showValueLabels)&&void 0!==F&&F,xl=!1!==(null==il?void 0:il.highlightOnHover),yl=!1!==(null==il?void 0:il.animate),gl=!1!==(null==il?void 0:il.showHeader),_l=null!==(T=null==il?void 0:il.sortBy)&&void 0!==T?T:"none",kl=l({label:U},X),Cl=l({label:Q},Y),Nl=o(function(){var l=null!=H?H:[];if("none"===_l)return l;var n="asc"===_l?1:-1;return i([],l,!0).sort(function(l,i){var e,t;return((null!==(e=l.value)&&void 0!==e?e:-1/0)-(null!==(t=i.value)&&void 0!==t?t:-1/0))*n})},[H,_l]),Ll=o(function(){return g(Nl,q,P,null==nl?void 0:nl.shadeRange)},[Nl,q,P,null==nl?void 0:nl.shadeRange]),Sl=o(function(){return _(Nl)},[Nl]),Ml=o(function(){return Nl.map(function(l,i){return{label:l.label,value:l.value,__index:i}})},[Nl]),wl=o(function(){return Nl.some(function(l){return L(l.value)})},[Nl]),zl=o(function(){var l=Nl.map(function(l){return l.value}).filter(L);return l.length?Math.max.apply(Math,l):0},[Nl]),Al=[null!=Cl.min?Cl.min:!1!==Cl.beginAtZero?0:"auto",null!=Cl.max?Cl.max:zl>0?Math.ceil(1.1*zl):"auto"],Bl=o(function(){return{value:{label:"Value",color:q}}},[q]),jl=function(l){var i=Nl[l];return i&&L(i.value)?{datum:i,value:i.value,color:Ll[l],index:l,total:Sl}:null},Fl=function(l){if(ol){var i=jl(l);i&&ol(i)}},Tl=function(l,i){var n=null==el?void 0:el(l,i);return"string"==typeof n||"number"==typeof n?String(n):f(l)},Gl=function(i){var e,t=i.x,a=i.y,o=i.width,r=i.height,u=i.index,d=Nl[u];return d&&L(d.value)?n("text",l({x:bl?t+o+6:t+o/2,y:bl?a+r/2+4:a-7,textAnchor:bl?"start":"middle",className:"ellm-bar-chart__value-label",opacity:xl&&null!==ul&&ul!==u?null!==(e=null==nl?void 0:nl.dimOpacity)&&void 0!==e?e:.45:1},{children:Tl(d.value,d)})):n("g",{})},Ol=null!==(G=null==nl?void 0:nl.barRadius)&&void 0!==G?G:6,Vl=bl?[0,Ol,Ol,0]:[Ol,Ol,0,0],Wl={dataKey:"label",type:"category",hide:!1===kl.show,tickLine:!1,axisLine:!kl.hideLine&&{stroke:vl},tickMargin:8,interval:null!==(O=kl.interval)&&void 0!==O?O:0,tick:function(i){var e,t;return n(S,l({},i,{fill:hl,maxChars:null!==(e=kl.tickMaxChars)&&void 0!==e?e:14,maxLines:null!==(t=kl.tickMaxLines)&&void 0!==t?t:2,axis:bl?"y":"x",formatTick:kl.formatTick}))}},El={type:"number",hide:!1===Cl.show,domain:Al,tickLine:!1,axisLine:!1===Cl.hideLine&&{stroke:vl},tickCount:Cl.tickCount,tick:{fill:hl,fontSize:11},tickFormatter:function(l){return Cl.formatTick?Cl.formatTick(Number(l),0):"number"==typeof l?f(l):String(l)}},Hl=null!==(V=Cl.width)&&void 0!==V?V:Cl.label?64:48,Rl={top:pl?24:12,right:bl&&pl?48:16,bottom:!bl&&kl.label?24:8,left:0},Il=null!==(W=null==nl?void 0:nl.cursorFill)&&void 0!==W?W:k(q,.06),Kl=R||I||K||D;return e("div",l({className:"ellm-bar-chart".concat((null==nl?void 0:nl.className)?" ".concat(nl.className):""),style:null==nl?void 0:nl.container},{children:[gl&&Kl&&e("div",l({className:"ellm-bar-chart__header"},{children:[e("div",l({className:"ellm-bar-chart__heading"},{children:[K&&n("span",l({className:"ellm-bar-chart__icon"},{children:K})),e("div",{children:[R&&n("div",l({className:"ellm-bar-chart__title"},{children:R})),I&&n("div",l({className:"ellm-bar-chart__description"},{children:I}))]})]})),D&&n("div",l({className:"ellm-bar-chart__actions"},{children:D}))]})),tl?n(p,{height:cl,bars:Math.max(Nl.length||6,3)}):wl?e(t,{children:[n(m,l({config:Bl,style:{height:cl,fontFamily:fl}},{children:function(){var i,a,o;return e(r,l({accessibilityLayer:!0,data:Ml,margin:Rl,layout:bl?"vertical":"horizontal",barCategoryGap:null!==(i=null==nl?void 0:nl.barCategoryGap)&&void 0!==i?i:"28%",onMouseMove:function(l){var i=(null==l?void 0:l.isTooltipActive)?l.activeTooltipIndex:null;dl("number"==typeof i?i:null)},onMouseLeave:function(){return dl(null)}},{children:[n(u,{horizontal:bl?!!(null==nl?void 0:nl.showVerticalGrid):!1!==(null==nl?void 0:nl.showGrid),vertical:bl?!1!==(null==nl?void 0:nl.showGrid):!!(null==nl?void 0:nl.showVerticalGrid),stroke:sl}),e(t,bl?{children:[n(d,l({},El,{height:Cl.label?48:void 0,label:Cl.label?{value:Cl.label,position:"insideBottom",offset:-4,fill:ml,fontSize:12,fontWeight:500}:void 0})),n(c,l({},Wl,{width:kl.tickMaxChars?7*kl.tickMaxChars:96}))]}:{children:[n(d,l({},Wl,{height:kl.label?64:44,label:kl.label?{value:kl.label,position:"insideBottom",offset:0,fill:ml,fontSize:12,fontWeight:500}:void 0})),n(c,l({},El,{width:Hl,label:Cl.label?{value:Cl.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"},fill:ml,fontSize:12,fontWeight:500}:void 0}))]}),!1!==(null==$?void 0:$.enabled)&&n(h,{cursor:{fill:Il,radius:6},content:function(l){var i,e,a,o=null===(a=null===(e=null===(i=null==l?void 0:l.payload)||void 0===i?void 0:i[0])||void 0===e?void 0:e.payload)||void 0===a?void 0:a.__index,r="number"==typeof o?jl(o):null;return r?(null==$?void 0:$.render)?n(t,{children:$.render(r)}):n(x,{ctx:r,config:$,valueFormatter:el}):null}}),n(s,l({dataKey:"value",radius:Vl,maxBarSize:null!==(o=null!==(a=null==nl?void 0:nl.barSize)&&void 0!==a?a:null==nl?void 0:nl.maxBarSize)&&void 0!==o?o:56,barSize:null==nl?void 0:nl.barSize,isAnimationActive:yl,animationDuration:600,onClick:function(l,i){return Fl(i)},onMouseEnter:function(l,i){return dl(i)},className:ol?"ellm-bar-chart__bar--clickable":void 0,label:pl?Gl:void 0},{children:Ml.map(function(l,i){var e,t=ul===i,a=xl&&null!==ul&&!t;return n(v,{className:"ellm-bar-chart__bar",fill:Ll[i],fillOpacity:a?null!==(e=null==nl?void 0:nl.dimOpacity)&&void 0!==e?e:.45:1,stroke:t?N(Ll[i],.22):void 0,strokeWidth:t?1.5:0},"".concat(l.label,"-").concat(i))})}))]}))}()})),(null==ll?void 0:ll.show)&&n("div",l({className:"ellm-bar-chart__legend ellm-bar-chart__legend--".concat(null!==(E=ll.align)&&void 0!==E?E:"center")},{children:Nl.map(function(i,t){return e("button",l({type:"button",className:"ellm-bar-chart__legend-item".concat(null!==ul&&ul!==t?" ellm-bar-chart__legend-item--off":""),onMouseEnter:function(){return dl(t)},onMouseLeave:function(){return dl(null)},onFocus:function(){return dl(t)},onBlur:function(){return dl(null)},onClick:function(){return Fl(t)}},{children:[n("span",{className:"ellm-bar-chart__legend-swatch",style:{background:Ll[t]}}),i.label]}),"".concat(i.label,"-").concat(t))})}))]}):n("div",l({className:"ellm-bar-chart__empty"},{children:null!=al?al:n(b,{})}))]}))}export{M as default};
|
|
2
|
+
//# sourceMappingURL=BarChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{BarChart3 as a}from"lucide-react";function i(i){var l=i.title,d=void 0===l?"No data to display":l,s=i.description,c=void 0===s?"There's no data for the selected date range and filters. Try adjusting your filters or picking a different range.":s;return r("div",e({className:"ellm-bar-chart__empty-default"},{children:[t("span",e({className:"ellm-bar-chart__empty-icon"},{children:t(a,{size:22})})),t("div",e({className:"ellm-bar-chart__empty-title"},{children:d})),t("div",e({className:"ellm-bar-chart__empty-desc"},{children:c}))]}))}export{i as default};
|
|
2
|
+
//# sourceMappingURL=BarChartEmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChartEmptyState.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";function l(l){var t=l.height,s=void 0===t?300:t,i=l.bars,n=void 0===i?6:i,m=[34,46,88,68,58,40,76,52];return a("div",e({className:"ellm-bar-chart__skeleton","aria-busy":"true","aria-live":"polite",style:{height:s}},{children:[r("div",e({className:"ellm-bar-chart__skeleton-yaxis"},{children:[0,1,2,3,4].map(function(e){return r("span",{className:"ellm-bar-chart__skeleton-tick ellm-bar-chart__shimmer"},e)})})),a("div",e({className:"ellm-bar-chart__skeleton-plot"},{children:[r("div",e({className:"ellm-bar-chart__skeleton-grid"},{children:[0,1,2,3,4].map(function(e){return r("span",{className:"ellm-bar-chart__skeleton-gridline"},e)})})),r("div",e({className:"ellm-bar-chart__skeleton-bars"},{children:Array.from({length:n}).map(function(e,a){return r("span",{className:"ellm-bar-chart__skeleton-bar ellm-bar-chart__shimmer",style:{height:"".concat(m[a%m.length],"%")}},a)})})),r("div",e({className:"ellm-bar-chart__skeleton-xaxis"},{children:Array.from({length:n}).map(function(e,a){return r("span",{className:"ellm-bar-chart__skeleton-tick ellm-bar-chart__shimmer"},a)})}))]}))]}))}export{l as default};
|
|
2
|
+
//# sourceMappingURL=BarChartSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChartSkeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as l}from"../../../_virtual/_tslib.js";import{jsxs as a,jsx as t}from"react/jsx-runtime";function e(e){var o,r=e.ctx,i=e.config,c=e.valueFormatter,s=r.datum,d=r.value,m=r.color,n=r.total,h=null!==(o=null==i?void 0:i.formatValue)&&void 0!==o?o:c,u=h?h(d,s):d,v=n>0?d/n*100:0;return a("div",l({className:"ellm-bar-chart__tooltip"},{children:[!1!==(null==i?void 0:i.showHeading)&&a("div",l({className:"ellm-bar-chart__tooltip-heading"},{children:[t("span",{className:"ellm-bar-chart__tooltip-swatch",style:{background:m}}),t("span",l({className:"ellm-bar-chart__tooltip-label"},{children:(null==i?void 0:i.formatHeading)?i.formatHeading(s.label):s.label}))]})),t("div",l({className:"ellm-bar-chart__tooltip-value"},{children:u})),(null==i?void 0:i.showShare)&&n>0&&a("div",l({className:"ellm-bar-chart__tooltip-share"},{children:[v.toFixed(1),"% of total"]}))]}))}export{e as default};
|
|
2
|
+
//# sourceMappingURL=BarChartTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChartTooltip.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DEFAULT_BAR_COLOR as n}from"./types.js";var r=function(n,r,t){return Math.min(t,Math.max(r,n))};function t(n){var r=n.trim();if(r.startsWith("#")){var t=r.slice(1);if(3===t.length||4===t.length){var e=t.slice(0,3).split(""),a=e[0],u=e[1],i=e[2];return{r:parseInt(a+a,16),g:parseInt(u+u,16),b:parseInt(i+i,16)}}return 6===t.length||8===t.length?{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}:null}var o=r.match(/^rgba?\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)/i);return o?{r:Number(o[1]),g:Number(o[2]),b:Number(o[3])}:null}function e(n,e){var a=t(n);if(!a)return n;var u=r(e,0,1),i=function(n){return Math.round(n+(255-n)*(1-u))};return"rgb(".concat(i(a.r),", ").concat(i(a.g),", ").concat(i(a.b),")")}function a(n,e){void 0===e&&(e=.18);var a=t(n);if(!a)return n;var u=r(1-e,0,1);return"rgb(".concat(Math.round(a.r*u),", ").concat(Math.round(a.g*u),", ").concat(Math.round(a.b*u),")")}function u(n,e){var a=t(n);return a?"rgba(".concat(a.r,", ").concat(a.g,", ").concat(a.b,", ").concat(r(e,0,1),")"):n}function i(r,t,a,u){void 0===t&&(t=n),void 0===a&&(a="rank"),void 0===u&&(u=[.22,1]);var i=u[0],o=u[1];if("none"===a)return r.map(function(n){var r;return null!==(r=n.color)&&void 0!==r?r:t});var l=r.map(function(n){return"number"==typeof n.value&&Number.isFinite(n.value)?n.value:null}),c=l.filter(function(n){return null!=n});if(0===c.length)return r.map(function(n){var r;return null!==(r=n.color)&&void 0!==r?r:t});var v,f=Math.min.apply(Math,c),s=Math.max.apply(Math,c);if("value"===a){var h=s-f;v=l.map(function(n){return null==n?i:0===h?o:i+(n-f)/h*(o-i)})}else{var m=Array.from(new Set(c)).sort(function(n,r){return n-r}),p=Math.max(m.length-1,1);v=l.map(function(n){if(null==n)return i;var r=m.indexOf(n);return 1===m.length?o:i+r/p*(o-i)})}return r.map(function(n,r){var a;return null!==(a=n.color)&&void 0!==a?a:e(t,v[r])})}function o(n){return n.reduce(function(n,r){return"number"==typeof r.value&&Number.isFinite(r.value)?n+r.value:n},0)}function l(n,r,t){var e=String(n).split(/\s+/).filter(Boolean).flatMap(function(n){var t;return n.length>r&&null!==(t=n.match(new RegExp(".{1,".concat(r,"}"),"g")))&&void 0!==t?t:[n]});if(0===e.length)return[""];var a=[],u="";if(e.forEach(function(n){var t=u?"".concat(u," ").concat(n):n;t.length<=r||!u?u=t:(a.push(u),u=n)}),u&&a.push(u),a.length<=t)return a;var i=a.slice(0,t);return i[t-1]="".concat(i[t-1].slice(0,Math.max(r-1,1)),"…"),i}function c(n,r){if(!(null==n?void 0:n.length))return[];var t=r.labelKey,e=r.valueKey,a=r.colorKey;return n.map(function(n){var r,u=n[e],i="string"==typeof u?Number(u):u;return{label:String(null!==(r=n[t])&&void 0!==r?r:""),value:"number"==typeof i&&Number.isFinite(i)?i:null,color:a?n[a]:void 0,meta:n}})}export{a as darken,t as parseColor,i as resolveBarColors,o as sumValues,c as toBarChartData,u as withAlpha,e as withIntensity,l as wrapLabel};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as n,useEffect as a}from"react";import{Button as o}from"primereact/button";import{RefreshCw as r,ListFilter as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as n,useEffect as a}from"react";import{Button as o}from"primereact/button";import{RefreshCw as r,CalendarClock as s,ListFilter as d}from"lucide-react";import c from"../DatePickers/DateSelector.js";import{DEFAULT_DATE_PRESETS as u}from"./datePreset.js";var v=function(v){var m,p,f,h,D=v.presets,b=void 0===D?u:D,g=v.filterCount,x=void 0===g?0:g,C=v.liveDuration,q=void 0===C?3e4:C,N=v.onDateChange,k=v.onRefresh,w=v.isRefreshLoading,y=v.onFilterClick,P=v.onSubscriptionsClick,R=v.showFilterButton,B=void 0===R||R,F=v.showSubscriptionButton,S=void 0!==F&&F,j=v.showLiveButton,E=void 0===j||j,z=v.showFilterCount,L=void 0!==z&&z,T=v.datePickerProps,I=v.initialStartDate,W=v.initialEndDate;v.defaultPresets;var _=v.pollingEnabled,A=void 0!==_&&_,H=v.selectedPreset,G=void 0===H?"today":H,J=v.handlePresetChange,K=n(!0),M=K[0],O=K[1],Q=n(I||null),U=Q[0],V=Q[1],X=n(W||null),Y=X[0],Z=X[1];a(function(){V(I||null),Z(W||null)},[I,W]);var $=n(!1),ee=$[0],te=$[1];a(function(){var e=setTimeout(function(){O(!1)},q);return function(){return clearTimeout(e)}},[G,q]),a(function(){if("custom"!==G){var e=b.find(function(e){return e.value===G});if(e&&e.getRange){var t=e.getRange();null==N||N({preset:G,startDate:t.startDate,endDate:t.endDate})}}},[G,b,N]);var ie=b;return t("div",e({className:"q-date-filter"},{children:[t("div",e({className:"q-date-filter-toolbar"},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[i("div",e({className:"q-preset-container"},{children:null==ie?void 0:ie.map(function(t){return i("button",e({className:"q-preset-btn ".concat(G===(null==t?void 0:t.value)?"active":""),onClick:function(){return null==J?void 0:J(null==t?void 0:t.value)}},{children:null==t?void 0:t.label}),null==t?void 0:t.value)})})),E&&t(l,M&&!A?{children:[i("div",{style:{width:"1px",height:"31px",backgroundColor:"#CBD5E1"}}),t("div",e({className:"q-live-chip"},{children:[i("span",{className:"q-live-dot"}),"Live Data"]}))]}:{children:[i("div",{className:"q-date-separator",style:{width:"1px",height:"31px",backgroundColor:"#CBD5E1"}}),t(o,e({className:"q-refresh-btn",onClick:k},{children:[i(r,{size:16,strokeWidth:2.5,className:w?"q-spin":""}),i("span",{children:w?"Refreshing...":"Refresh"})]}))]})]})),t("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[S&&t("button",e({className:"q-filter-btn",onClick:P},{children:[i(s,{size:12.5}),"Subscriptions"]})),B&&t("button",e({className:"q-filter-btn",onClick:y},{children:[i(d,{size:12.5}),"Filters",L&&x>0&&i("span",e({className:"q-filter-badge"},{children:x}))]}))]}))]})),"custom"===G&&t("div",e({className:"q-custom-container"},{children:[i(c,{label:"From",value:U,minDate:null===(m=null==T?void 0:T.from)||void 0===m?void 0:m.minDate,maxDate:null!=Y?Y:null===(p=null==T?void 0:T.from)||void 0===p?void 0:p.maxDate,onChange:function(e){V(e),te(!1)},styles:{root:{width:"250px"}}}),i(c,{label:"To",value:Y,minDate:null!=U?U:null===(f=null==T?void 0:T.to)||void 0===f?void 0:f.minDate,maxDate:null===(h=null==T?void 0:T.to)||void 0===h?void 0:h.maxDate,onChange:function(e){Z(e),te(!1)},styles:{root:{width:"250px"}}}),i(o,{className:"q-apply-btn",label:"Apply Range",disabled:!U||!Y||ee,onClick:function(){if(U&&Y){var e=new Date(U);e.setHours(0,0,0,0);var t=new Date;null==N||N({preset:"custom",startDate:e,endDate:t}),te(!0)}}})]}))]}))};export{v as default};
|
|
2
2
|
//# sourceMappingURL=DashboardDateFilter.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as e,__assign as r,__awaiter as s,__generator as i}from"../../../../_virtual/_tslib.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";import{useState as n,useEffect as t,useMemo as o}from"react";import{X as c,Check as u,Info as d}from"lucide-react";import b from"../../DropDowns/CustomSingleSelect.js";import v from"../../DropDowns/CustomMultiSelect.js";var m=function(m){var p=m.isOpen,f=m.onClose,h=m.scopeFields,y=void 0===h?[]:h,g=m.subscriptionTypes,N=void 0===g?[{label:"Periodic",value:"Periodic",triggers:[{label:"Daily",value:"daily",info:"Email is sent at 8:00 AM on the next day after the selected period."},{label:"Weekly",value:"weekly",info:"Email is sent at 8:00 AM on the Monday after the selected period."},{label:"Monthly",value:"monthly",info:"Email is sent at 8:00 AM on the Monday after the selected period."}]},{label:"Event-based",value:"Event-based"}]:g,q=m.onSearchSubscribers,C=m.onSave,S=m.editData,w=n(1),L=w[0],k=w[1],x=n(""),A=x[0],M=x[1],E=n({}),T=E[0],j=E[1],z=n("Periodic"),D=z[0],O=z[1],P=n("daily"),_=P[0],B=P[1],W=n([]),U=W[0],F=W[1],R=n(""),H=R[0],G=R[1],I=n(!1),J=I[0],K=I[1],Q=n([]),V=Q[0],X=Q[1],Y=n(!1),Z=Y[0],$=Y[1];t(function(){if(p&&S){M(S.name||"");var e={},r=(null==S?void 0:S.reportScope)||{};Object.keys(r).forEach(function(s){var i=r[s],a=y.find(function(e){return e.id.toLowerCase()===s.toLowerCase()||e.label.toLowerCase()===s.toLowerCase()});"string"==typeof i&&"multiSelect"===(null==a?void 0:a.scopeType)&&i.includes(",")&&(i=i.split(",").map(function(e){return e.trim()}));var l=i;if(a&&a.options){var n=function(e){var r=String(e).trim().toLowerCase(),s=a.options.find(function(e){return String(e.value).toLowerCase()===r||String(e.label).toLowerCase()===r});return s?s.value:e};Array.isArray(i)?l=i.map(n):i&&(l=n(i))}var t=a?a.id:s;"multiSelect"===(null==a?void 0:a.scopeType)?e[t]=Array.isArray(l)?l:l?[l]:[]:"singleSelect"===(null==a?void 0:a.scopeType)?e[t]=Array.isArray(l)?l.length>0?l[0]:"":l:e[t]=l}),k(1),j(e),O(S.type||(N.length>0?N[0].value:"Periodic")),B(S.trigger||"daily");var s=Array.isArray(S.subscribers)?S.subscribers.map(function(e){var r="string"==typeof e?e:e.email||e.value||e.name||e;return{label:"string"==typeof e?e:e.name||e.label||e.email||r,value:r}}):S.subscribers?[{label:"string"==typeof S.subscribers?S.subscribers:S.subscribers.name||S.subscribers.email||S.subscribers,value:"string"==typeof S.subscribers?S.subscribers:S.subscribers.email||S.subscribers.value||S.subscribers}]:[];F(s)}else p&&!S&&(k(1),M(""),j({}),O(N.length>0?N[0].value:"Periodic"),B("daily"),F([]),G(""),X([]))},[p,S,N]);var ee=o(function(){var r=e([],y,!0);return(null==S?void 0:S.reportScope)&&Object.keys(S.reportScope).forEach(function(e){var s=r.find(function(r){var s,i;return(null===(s=r.id)||void 0===s?void 0:s.toLowerCase())===e.toLowerCase()||(null===(i=r.label)||void 0===i?void 0:i.toLowerCase())===e.toLowerCase()});if(!s){var i=S.reportScope[e],a=Array.isArray(i);r.push({id:e,label:e.charAt(0).toUpperCase()+e.slice(1),options:a?i.map(function(e){return{label:e,value:e}}):[{label:i,value:i}],scopeType:a?"multiSelect":"singleSelect"})}}),r},[y,S]);if(!p)return null;var re=function(e,r){if(!e)return r?[]:"";var s=Object.keys(T).find(function(r){return r.toLowerCase()===e.toLowerCase()});if(s&&void 0!==T[s]){var i=T[s];return r?Array.isArray(i)?i:i?[i]:[]:Array.isArray(i)?i.length>0?i[0]:"":i}return r?[]:""};return a("div",r({className:"q-subs-modal-overlay"},{children:l("div",r({className:"q-subs-modal"},{children:[l("div",r({className:"q-subs-modal-header"},{children:[a("div",r({className:"q-subs-modal-title"},{children:S?"Edit Subscription":"Create Subscription"})),a("button",r({className:"q-subs-modal-close",onClick:f},{children:a(c,{size:14})}))]})),l("div",r({className:"q-subs-stepper"},{children:[l("div",r({className:"q-subs-step ".concat(L>=1?L>1?"completed":"active":"")},{children:[a("div",r({className:"q-subs-step-num"},{children:L>1?a(u,{size:14}):"1"})),"Name & scope"]})),a("div",{className:"q-subs-step-line ".concat(L>1?"completed":"")}),l("div",r({className:"q-subs-step ".concat(L>=2?L>2?"completed":"active":"")},{children:[a("div",r({className:"q-subs-step-num"},{children:L>2?a(u,{size:14}):"2"})),"Type"]})),a("div",{className:"q-subs-step-line ".concat(L>2?"completed":"")}),l("div",r({className:"q-subs-step ".concat(L>=3?"active":"")},{children:[a("div",r({className:"q-subs-step-num"},{children:"3"})),"Subscribers"]}))]})),l("div",r({className:"q-subs-modal-body"},{children:[1===L&&l("div",{children:[l("div",r({className:"q-subs-form-group"},{children:[l("label",r({className:"q-subs-form-label"},{children:["Subscription name ",a("span",r({className:"req"},{children:"*"}))]})),a("input",{type:"text",className:"q-subs-input",placeholder:"e.g. Midwest Music Weekly Report",value:A,onChange:function(e){return M(e.target.value)}})]})),a("div",{style:{height:"1px",background:"#E2E8F0",margin:"0 0 24px 0"}}),a("label",r({className:"q-subs-form-label"},{children:"Report scope"})),a("div",r({className:"q-subs-grid-2"},{children:ee.map(function(e){var s,i,n,t;return l("div",{children:[a("label",r({className:"q-subs-form-desc",style:{display:"block",marginBottom:"4px",color:"#475569"}},{children:e.label})),"multiSelect"===e.scopeType?a(v,{options:(null===(s=e.options)||void 0===s?void 0:s.map(function(e){var r="string"==typeof e?e:e.value||e.id||e;return{label:"string"==typeof e?e:e.label||e.name||r,value:r}}))||[],value:re(e.id,!0)||[],onChange:function(s){var i,a=Object.keys(T).find(function(r){return r.toLowerCase()===(e.id||"").toLowerCase()});j(r(r({},T),((i={})[a||e.id]=s,i)))},placeholder:"Select ".concat((null===(i=e.label)||void 0===i?void 0:i.toLowerCase())||"")}):a(b,{options:(null===(n=e.options)||void 0===n?void 0:n.map(function(e){var r="string"==typeof e?e:e.value||e.id||e;return{label:"string"==typeof e?e:e.label||e.name||r,value:r}}))||[],value:re(e.id,!1)||"",onChange:function(s){var i,a=Object.keys(T).find(function(r){return r.toLowerCase()===(e.id||"").toLowerCase()});j(r(r({},T),((i={})[a||e.id]=s,i)))},placeholder:"Select ".concat((null===(t=e.label)||void 0===t?void 0:t.toLowerCase())||"")})]},e.id)})}))]}),2===L&&l("div",{children:[l("div",r({className:"q-subs-form-group"},{children:[a("label",r({className:"q-subs-form-label",style:{marginBottom:"4px"}},{children:"Subscription Type"})),a("div",r({className:"q-subs-form-desc"},{children:"Choose when you want to receive this report."})),a("div",r({className:"q-subs-radio-group"},{children:N.map(function(e){return l("label",r({className:"q-subs-radio-label"},{children:[a("input",{type:"radio",className:"q-subs-radio",checked:D===e.value,onChange:function(){return O(e.value)}})," ",e.label]}),e.value)})}))]})),function(){var e=N.find(function(e){return e.value===D}),s=null==e?void 0:e.triggers;if(s&&s.length>0){var i=s.find(function(e){return e.value===_});return l("div",r({className:"q-subs-form-group"},{children:[a("label",r({className:"q-subs-form-label",style:{marginBottom:"4px"}},{children:"Trigger"})),a("div",r({className:"q-subs-form-desc"},{children:"How often should this report be sent?"})),a("div",r({style:{width:"60%"}},{children:a(b,{options:s.map(function(e){return{label:e.label,value:e.value}}),value:_,onChange:function(e){return B(e)},placeholder:"Select trigger"})})),i&&i.info&&l("div",r({className:"q-subs-info"},{children:[a(d,{size:12,strokeWidth:3}),i.info]}))]}))}return null}()]}),3===L&&a("div",{children:l("div",r({className:"q-subs-form-group"},{children:[a("label",r({className:"q-subs-form-label",style:{marginBottom:"4px"}},{children:"Subscribers"})),a("div",r({className:"q-subs-form-desc"},{children:"Who should receive this report?"})),l("div",r({className:"q-subs-search-box"},{children:[a("input",{type:"text",className:"q-subs-input",placeholder:"Type name or email...",value:H,onChange:function(e){return s(void 0,void 0,void 0,function(){var r,s;return i(this,function(i){switch(i.label){case 0:if(r=e.target.value,G(r),!r)return X([]),[2];if(!q)return[3,5];$(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,q(r)];case 2:return s=i.sent(),X(s||[]),[3,5];case 3:return i.sent(),X([]),[3,5];case 4:return $(!1),[7];case 5:return[2]}})})}}),Z&&a("div",r({style:{position:"absolute",right:"12px",top:"10px",fontSize:"12px",color:"#94a3b8"}},{children:"Loading..."})),V.length>0&&H&&a("div",r({className:"q-subs-search-results"},{children:V.map(function(s){return a("div",r({className:"q-subs-search-item",onClick:function(){return function(r){U.find(function(e){return e.value===r.value})||F(e(e([],U,!0),[r],!1)),G(""),X([])}(s)}},{children:s.label}),s.value)})}))]})),U.length>0&&a("div",r({className:"q-subs-chips"},{children:U.map(function(e){return l("div",r({className:"q-subs-chip"},{children:[e.label,a("div",r({className:"q-subs-chip-remove",onClick:function(){return r=e.value,void F(U.filter(function(e){return e.value!==r}));var r}},{children:a(c,{size:12,strokeWidth:3})}))]}),e.value)})}))]}))})]})),l("div",r({className:"q-subs-modal-footer"},{children:[a("button",1===L?r({className:"q-subs-btn-cancel",onClick:f},{children:"Cancel"}):r({className:"q-subs-btn-cancel",onClick:function(){return k(function(e){return Math.max(e-1,1)})}},{children:"Back"})),L<3?l("button",r({className:"q-subs-btn-primary",onClick:function(){return k(function(e){return Math.min(e+1,3)})},disabled:1===L&&!A.trim()},{children:["Next ",a("span",r({style:{marginLeft:"4px"}},{children:"→"}))]})):a("button",r({className:"q-subs-btn-primary",onClick:function(){return s(void 0,void 0,void 0,function(){var e,r,s,a,l;return i(this,function(i){switch(i.label){case 0:return K(!0),e={name:A,scope:T,subscription_type:D.toLowerCase(),trigger_frequency:(null===(l=null===(a=N.find(function(e){return e.value===D}))||void 0===a?void 0:a.triggers)||void 0===l?void 0:l.length)?_:"",trigger_event:D,subscriber_emails:U.map(function(e){return e.value})},r=!1,C?[4,C(e,!!(null==S?void 0:S.id))]:[3,2];case 1:return s=i.sent(),r=!1!==s,[3,3];case 2:r=!0,i.label=3;case 3:return K(!1),r&&(f(),k(1),M(""),j({}),O("Periodic"),B("daily"),F([]),G("")),[2]}})})},disabled:J||0===U.length},{children:J?S?"Updating...":"Creating...":S?"Update Subscription":"Create Subscription"}))]}))]}))}))};export{m as default};
|
|
2
|
+
//# sourceMappingURL=CreateSubscriptionModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSubscriptionModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../../_virtual/_tslib.js";import{jsxs as a,jsx as l,Fragment as r}from"react/jsx-runtime";import{X as i}from"lucide-react";import n from"../../MetricCard/MetricCard.js";function s(s){var d,c=s.visible,t=s.onHide,m=s.reportData,o=s.loading;if(!c)return null;var p=null==m?void 0:m.banner;return a("div",e({className:"q-rep-panel"},{children:[a("div",e({className:"q-rep-panel-header"},{children:[a("div",{children:[l("div",e({className:"q-rep-title"},{children:o?"Loading…":(null==m?void 0:m.title)||"Report"})),(null==m?void 0:m.subtitle)&&l("div",e({className:"q-rep-subtitle"},{children:m.subtitle}))]}),l("button",e({className:"q-rep-close-btn",onClick:t,"aria-label":"Close report"},{children:l(i,{size:16})}))]})),l("div",e({className:"q-rep-panel-content"},{children:o||!m?l("div",e({style:{padding:"40px",textAlign:"center",color:"#64748b"}},{children:"Loading report…"})):a(r,{children:[a("div",e({className:"q-rep-banner",style:{backgroundColor:null!==(d=null==p?void 0:p.backgroundColor)&&void 0!==d?d:"#0f172a"}},{children:[a("div",e({className:"q-rep-banner-left"},{children:[a("div",e({className:"q-rep-banner-top-row"},{children:[(null==p?void 0:p.icon)&&l("div",e({className:"q-rep-banner-icon"},{children:p.icon})),l("span",e({className:"q-rep-brand-name",style:null==p?void 0:p.brandNameStyle},{children:null==p?void 0:p.brandName}))]})),(null==p?void 0:p.appName)&&l("span",e({className:"q-rep-app-name",style:null==p?void 0:p.appNameStyle},{children:p.appName}))]})),a("div",e({className:"q-rep-generated"},{children:[l("span",e({className:"q-rep-generated-label",style:null==p?void 0:p.generatedOnLabelStyle},{children:"Generated On"})),l("span",e({className:"q-rep-generated-value",style:null==p?void 0:p.generatedOnValueStyle},{children:null==p?void 0:p.generatedOn}))]}))]})),a("div",e({className:"q-rep-summary-card"},{children:[a("div",e({className:"q-rep-summary-header"},{children:[l("div",{className:"q-rep-summary-accent"}),a("div",{children:[l("div",e({className:"q-rep-summary-title"},{children:m.summary.title})),l("div",e({className:"q-rep-summary-desc"},{children:m.summary.description}))]})]})),l("div",e({className:"q-rep-scope-grid"},{children:m.scope.map(function(r,i){return a("div",e({className:"q-rep-scope-item"},{children:[l("div",e({className:"q-rep-scope-item-label"},{children:r.label})),l("div",e({className:"q-rep-scope-item-value"},{children:r.value}))]}),i)})})),l("div",e({className:"q-rep-metrics-grid"},{children:m.metrics.map(function(a,r){var i;return l(n,e({},a,{classNames:e(e({},a.classNames),{root:"q-rep-metric-card ".concat((null===(i=a.classNames)||void 0===i?void 0:i.root)||"")})}),r)})}))]}))]})}))]}))}export{s as default};
|
|
2
|
+
//# sourceMappingURL=ReportSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportSidebar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={today:{label:"Today",value:"today",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),endDate:e}}},yesterday:{label:"Yesterday",value:"yesterday",getRange:function(){var e=new Date;return e.setDate(e.getDate()-1),{startDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),endDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59)}}},"7days":{label:"7 Days",value:"7days",getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-6),{startDate:t,endDate:e}}},"15days":{label:"15 Days",value:"15days",getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-14),{startDate:t,endDate:e}}},"30days":{label:"30 Days",value:"30days",getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-29),{startDate:t,endDate:e}}},thisMonth:{label:"This Month",value:"thisMonth",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth(),1),endDate:e}}},lastMonth:{label:"Last Month",value:"lastMonth",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-1,1),endDate:new Date(e.getFullYear(),e.getMonth(),0,23,59,59)}}},last3Months:{label:"Last 3 Months",value:"last3Months",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-3,e.getDate()),endDate:e}}},"6months":{label:"6 Months",value:"6months",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-6,e.getDate()),endDate:e}}},"1year":{label:"1 Year",value:"1year",getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear()-1,e.getMonth(),e.getDate()),endDate:e}}},custom:{label:"Custom",value:"custom"}},t=[e.today,e.yesterday,e["7days"],e["15days"],e["30days"],e.thisMonth,e.lastMonth,e.last3Months,e.custom],a=null==t?void 0:t.reduce(function(e,t){return e[t.value]=t,e},{});export{e as DATE_PRESETS,a as DATE_PRESET_MAP,t as DEFAULT_DATE_PRESETS};
|
|
1
|
+
var e={today:{label:"Today",value:"today",pollingEnabled:!0,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),endDate:e}}},"1hour":{label:"1 Hour",value:"1hour",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setHours(t.getHours()-1),{startDate:t,endDate:e}}},"3hours":{label:"3 Hours",value:"3hours",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setHours(t.getHours()-3),{startDate:t,endDate:e}}},"6hours":{label:"6 Hours",value:"6hours",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setHours(t.getHours()-6),{startDate:t,endDate:e}}},"12hours":{label:"12 Hours",value:"12hours",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setHours(t.getHours()-12),{startDate:t,endDate:e}}},yesterday:{label:"Yesterday",value:"yesterday",pollingEnabled:!1,getRange:function(){var e=new Date;return e.setDate(e.getDate()-1),{startDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),endDate:new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59)}}},"7days":{label:"7 Days",value:"7days",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-6),{startDate:t,endDate:e}}},"15days":{label:"15 Days",value:"15days",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-14),{startDate:t,endDate:e}}},"30days":{label:"30 Days",value:"30days",pollingEnabled:!0,getRange:function(){var e=new Date,t=new Date;return t.setDate(t.getDate()-29),{startDate:t,endDate:e}}},thisMonth:{label:"This Month",value:"thisMonth",pollingEnabled:!0,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth(),1),endDate:e}}},lastMonth:{label:"Last Month",value:"lastMonth",pollingEnabled:!1,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-1,1),endDate:new Date(e.getFullYear(),e.getMonth(),0,23,59,59)}}},last3Months:{label:"Last 3 Months",value:"last3Months",pollingEnabled:!0,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-3,e.getDate()),endDate:e}}},"6months":{label:"6 Months",value:"6months",pollingEnabled:!0,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear(),e.getMonth()-6,e.getDate()),endDate:e}}},"1year":{label:"1 Year",value:"1year",pollingEnabled:!0,getRange:function(){var e=new Date;return{startDate:new Date(e.getFullYear()-1,e.getMonth(),e.getDate()),endDate:e}}},custom:{label:"Custom",value:"custom"}},t=[e.today,e["1hour"],e["3hours"],e["6hours"],e["12hours"],e.yesterday,e["7days"],e["15days"],e["30days"],e.thisMonth,e.lastMonth,e.last3Months,e.custom],a=null==t?void 0:t.reduce(function(e,t){return e[t.value]=t,e},{});export{e as DATE_PRESETS,a as DATE_PRESET_MAP,t as DEFAULT_DATE_PRESETS};
|
|
2
2
|
//# sourceMappingURL=datePreset.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n}from"../../../_virtual/_tslib.js";import{jsxs as c,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as a,useMemo as i}from"react";import{Search as s}from"lucide-react";function o(o){var u=o.options,m=o.value,d=o.onChange,v=o.placeholder,h=void 0===v?"Select":v,f=o.searchPlaceholder,p=void 0===f?"Search..":f,
|
|
1
|
+
import{__assign as e,__spreadArray as n}from"../../../_virtual/_tslib.js";import{jsxs as c,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as a,useMemo as i}from"react";import{Search as s}from"lucide-react";function o(o){var u=o.options,m=o.value,d=o.onChange,v=o.placeholder,h=void 0===v?"Select":v,f=o.searchPlaceholder,p=void 0===f?"Search..":f,g=o.showSelectAll,N=void 0===g||g,b=o.selectAllLabel,k=void 0===b?"All":b,x=r(!1),C=x[0],w=x[1],L=r(""),A=L[0],y=L[1],S=l(null);a(function(){var e=function(e){var n;(null===(n=S.current)||void 0===n?void 0:n.contains(e.target))||w(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var T=i(function(){var e=A.trim().toLowerCase();return e?u.filter(function(n){return n.label.toLowerCase().includes(e)}):u},[u,A,m]),j=i(function(){return u.map(function(e){return e.value})},[u]),E=m.length>0&&j.every(function(e){return m.includes(e)}),_=i(function(){var e;if(0===m.length)return h;if(E)return"All";if(1===m.length){var n=u.find(function(e){return e.value===m[0]});return null!==(e=null==n?void 0:n.label)&&void 0!==e?e:"1 selected"}return"".concat(m.length," selected")},[m,E,u,h]);return c("div",e({className:"cms-root",ref:S},{children:[c("button",e({type:"button",className:"cms-trigger",onClick:function(){return w(function(e){return!e})}},{children:[t("span",e({className:"cms-triggerText ".concat(m.length?"cms-hasValue":"")},{children:_})),t("span",e({className:"cms-chevron"},{children:"▾"}))]})),C&&c("div",e({className:"cms-panel"},{children:[u.length>0&&c("div",e({className:"cms-searchRow"},{children:[t(s,{size:18}),t("input",{className:"cms-searchInput",placeholder:p,value:A,onChange:function(e){return y(e.target.value)},autoFocus:!0})]})),N&&!(null==A?void 0:A.trim())&&u.length>0&&c("div",e({className:"cms-item",onClick:function(){d(E?[]:j)}},{children:[t("span",e({className:"cms-checkbox ".concat(E?"cms-checked":"")},{children:E?"✓":""})),t("span",e({className:"cms-itemText"},{children:k}))]})),t("div",e({className:"cms-list"},{children:0===T.length?t("div",e({className:"cms-empty"},{children:"No options found"})):T.map(function(r){var l=m.includes(r.value);return c("div",e({className:"cms-item",onClick:function(){return e=r.value,void(m.includes(e)?d(m.filter(function(n){return n!==e})):d(n(n([],m,!0),[e],!1)));var e}},{children:[t("span",e({className:"cms-checkbox ".concat(l?"cms-checked":"")},{children:l?"✓":""})),t("span",e({className:"cms-itemText"},{children:r.label}))]}),r.value)})}))]}))]}))}export{o as default};
|
|
2
2
|
//# sourceMappingURL=CustomMultiSelect.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as l,__spreadArray as i}from"../../_virtual/_tslib.js";import{jsx as o,Fragment as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as d}from"react";import{ChartLine as a}from"lucide-react";import r from"./DashboardDateFilter/DashboardDateFilter.js";import u from"./MetricCard/MetricCard.js";import v from"./FiltersSidebar/FiltersSidebar.js";import s from"./Graph/Graph.js";import p from"./Graph/GraphEmptyState.js";import{DATE_PRESET_MAP as c}from"./DashboardDateFilter/datePreset.js";import m from"./Table/TableCard.js";import g from"./Table/TableGrid/TableGrid.js";import{buildColumns as h,withRowIds as f}from"../utils/tableColumns.js";import{resolveSectionOrder as b,isSectionHidden as y}from"../utils/sectionOrder.js";import{getActiveFilterCount as F,isKpiValueObject as C,getKpiValueColor as k,getKpiDelta as x,formatKpiValue as D}from"../utils/index.js";import{getKpiIcon as w}from"../utils/kpiIcon.js";var B=["#7c3aed","#FFC130","#F43F5E","#10b981","#3b82f6"];function S(S){var j,L,A,O,P,T,M,R,E,V,G,H,z,I,W,q,K,N,Z,_,J,Q,U,X,Y,$,ll,il,ol,el,nl,tl,dl,al,rl,ul,vl,sl=S.uiConfig,pl=S.data,cl=S.dataLoading,ml=S.startDate,gl=S.endDate,hl=S.onDateChange,fl=S.onRefresh,bl=S.selectedKpis,yl=S.onKpiChange,Fl=S.sidebarVisible,Cl=S.onSidebarShow,kl=S.onSidebarHide,xl=S.filterValues,Dl=S.onFilterChange,wl=S.onFilterReset,Bl=S.onFilterApply,Sl=S.appliedFilters,jl=S.graphEmptyState,Ll=S.tables,Al=S.tableLayout,Ol=S.sectionOrder,Pl=S.hiddenSections,Tl=S.tablePages,Ml=S.onTableExpand,Rl=S.onTableLoadMore,El=null!==(A=null===(L=null===(j=null==sl?void 0:sl.data)||void 0===j?void 0:j.dateFilters)||void 0===L?void 0:L.datepresets)&&void 0!==A?A:[],Vl=d(function(){return El.map(function(l){return c[l]}).filter(Boolean)},[JSON.stringify(El)]),Gl=d(function(){return F(Sl)},[Sl]),Hl=d(function(){var l,i,o=null==Al?void 0:Al.spans;if(o)return(null!==(i=null===(l=null==sl?void 0:sl.data)||void 0===l?void 0:l.tableBuilder)&&void 0!==i?i:[]).map(function(l,i){return Array.isArray(o)?o[i]:o[l.key]})},[null==Al?void 0:Al.spans,null===(O=null==sl?void 0:sl.data)||void 0===O?void 0:O.tableBuilder]),zl=o("div",l({style:{padding:"4px"}},{children:o(s,{loading:cl,emptyState:null!=jl?jl:o(p,{}),title:null===(P=null==sl?void 0:sl.data)||void 0===P?void 0:P.graphBuilder.title,description:null===(M=null===(T=null==sl?void 0:sl.data)||void 0===T?void 0:T.graphBuilder)||void 0===M?void 0:M.subtitle,icon:o(a,{size:18}),xAxis:{label:(null===(E=null===(R=null==sl?void 0:sl.data)||void 0===R?void 0:R.graphBuilder)||void 0===E?void 0:E.axis.xAxisLabel)||"Date"},style:{chartHeight:220},panes:null===(V=null==sl?void 0:sl.data)||void 0===V?void 0:V.graphBuilder.tiers.map(function(l,i){var e,n,t,d,r,u,v,s,p,c,m,g=bl[l.key]||(null===(e=l.plotOptions[0])||void 0===e?void 0:e.key),h=pl.graph.tier.find(function(i){return i.key===l.key}),f=(null===(n=null==h?void 0:h.plotbyoptions)||void 0===n?void 0:n[g])||{},b=(null==l?void 0:l.series)||[],y=Object.keys(f),F=l.plotOptions.find(function(l){return l.value===g});return{key:l.key,selector:{label:"Plot By",value:g,onChange:function(i){yl(l.key,i)},options:l.plotOptions.map(function(l){return{label:l.label,value:l.value}}),triggerIcon:o(a,{size:16,color:0===i?"green":"purple"})},yAxis:{label:null==F?void 0:F.yAxisLabel,beginAtZero:"false"!==(null==g?void 0:g.yAxisBeginAtZero)},tooltip:{formatHeading:function(l){return"".concat(l)}},legend:{position:(null===(r=null===(d=null===(t=null==sl?void 0:sl.data)||void 0===t?void 0:t.graphBuilder)||void 0===d?void 0:d.legend)||void 0===r?void 0:r.position)||"bottom",toggle:"yes"===(null===(s=null===(v=null===(u=null==sl?void 0:sl.data)||void 0===u?void 0:u.graphBuilder)||void 0===v?void 0:v.legend)||void 0===s?void 0:s.allowToggle),align:(null===(m=null===(c=null===(p=null==sl?void 0:sl.data)||void 0===p?void 0:p.graphBuilder)||void 0===c?void 0:c.legend)||void 0===m?void 0:m.alignment)||"center"},height:0===i?300:250,series:y.map(function(l,i){var o,e,n=(null===(e=null===(o=null==h?void 0:h.plotbyoptions)||void 0===o?void 0:o[g])||void 0===e?void 0:e[l])||[],t=B[i%B.length],d=b.find(function(i){return i.key===l});return{key:l,label:(null==d?void 0:d.name)||l,data:n,area:"yes"===(null==d?void 0:d.areaFill),curve:(null==d?void 0:d.curveType)||"linear",color:"#".concat(null==d?void 0:d.color)||t,dashed:"dashed"===(null==d?void 0:d.style),strokeWidth:parseInt(null==d?void 0:d.strokeWidth)||2,showPoints:"yes"===(null==d?void 0:d.showPoints),pointRadius:parseInt(null==d?void 0:d.pointRadius)||3,showInLegend:!0,valueFormatter:function(l){return"".concat(l)}}})}})})})),Il=o("div",l({style:{padding:"4px",display:"flex",gap:"10px",flexWrap:"wrap"}},{children:i([],null!==(H=null===(G=null==sl?void 0:sl.data)||void 0===G?void 0:G.kpiCards)&&void 0!==H?H:[],!0).sort(function(l,i){var o,e;return(null!==(o=l.displayOrder)&&void 0!==o?o:0)-(null!==(e=i.displayOrder)&&void 0!==e?e:0)}).map(function(l){var i,e=null===(i=null==pl?void 0:pl.kpiCards)||void 0===i?void 0:i[l.title],n=C(e)?k(e.currentValue,e.baselineValue,l.indicatorLogic):void 0,t=C(e)?x(e.currentValue,e.baselineValue,l.indicatorLogic):void 0;return o(u,{title:l.title,subtitle:l.subtitle,value:D(e,l.valueFormat),valueColor:n,delta:t&&{label:t.label,direction:t.direction,color:n},icon:w(l.icon),loading:cl},l.title)})})),Wl=(null!==(W=null===(I=null===(z=null==sl?void 0:sl.data)||void 0===z?void 0:z.tableBuilder)||void 0===I?void 0:I.length)&&void 0!==W?W:0)>0?o("div",l({style:{padding:"4px"}},{children:o(g,l({itemSpans:Hl,totalColumns:null!==(q=null==Al?void 0:Al.totalColumns)&&void 0!==q?q:12,defaultSpan:null==Al?void 0:Al.defaultSpan,options:null!==(K=null==Al?void 0:Al.options)&&void 0!==K?K:[1,2,3],defaultColumns:null==Al?void 0:Al.defaultColumns,columns:null==Al?void 0:Al.columns,onColumnsChange:null==Al?void 0:Al.onColumnsChange,showToggle:(null===(N=null==Al?void 0:Al.showToggle)||void 0===N||N)&&(null!==(J=null===(_=null===(Z=null==sl?void 0:sl.data)||void 0===Z?void 0:Z.tableBuilder)||void 0===_?void 0:_.length)&&void 0!==J?J:0)>1,toggleLabel:null==Al?void 0:Al.toggleLabel,minColumnWidth:null!==(Q=null==Al?void 0:Al.minColumnWidth)&&void 0!==Q?Q:380,gap:null!==(U=null==Al?void 0:Al.gap)&&void 0!==U?U:12,equalHeights:null===(X=null==Al?void 0:Al.equalHeights)||void 0===X||X},{children:sl.data.tableBuilder.map(function(i){var e,n,d=null!==(n=null===(e=null==pl?void 0:pl.table)||void 0===e?void 0:e[i.key])&&void 0!==n?n:[],a=null==Tl?void 0:Tl[i.key],r=!!(null==a?void 0:a.loaded),u=r?a.rows:d,v=!r&&i.rowLimit&&i.rowLimit>0?d.slice(0,i.rowLimit):u,s=null==Ll?void 0:Ll[i.key],p=h(i,s),c=null==s?void 0:s.card,g=null==c?void 0:c.icon,b=w(i.icon),y=b&&t.isValidElement(b)?t.cloneElement(b,l(l({},null!=(null==g?void 0:g.size)?{size:g.size}:{}),(null==g?void 0:g.color)?{color:g.color}:{})):b,F=g?l(l(l({width:"auto",height:"auto"},g.color?{color:g.color}:{}),g.background?{background:g.background,padding:6,borderRadius:8}:{}),g.style):void 0;return o(m,{title:i.title,icon:y,styles:{root:null==c?void 0:c.root,header:null==c?void 0:c.header,title:null==c?void 0:c.title,icon:F},onExpand:function(l){return null==Ml?void 0:Ml(i.key,l)},table:{rows:f(v),columns:p,loading:cl,loadingMore:null==a?void 0:a.loading,hasMore:null==a?void 0:a.hasMore,onLoadMore:a?function(){return null==Rl?void 0:Rl(i.key)}:void 0,tableProps:null==s?void 0:s.tableProps}},i.key)})}))})):null,ql={graphBuilder:zl,kpiCards:Il,tableBuilder:Wl},Kl=b(Ol,Pl,null===(Y=null==sl?void 0:sl.data)||void 0===Y?void 0:Y.sectionOrder,Object.keys(ql)),Nl=y(Pl,"dateFilters"),Zl=y(Pl,"sidebarFilters");return o(e,{children:n("div",l({style:{display:"flex",flexDirection:"column",gap:12}},{children:[!Nl&&o("div",l({style:{padding:"4px"}},{children:o(r,{filterCount:Gl,initialStartDate:ml,initialEndDate:gl,onDateChange:hl,onRefresh:fl,onFilterClick:Cl,presets:Vl,datePickerProps:{from:{minDate:new Date(2025,0,1),maxDate:new Date},to:{minDate:ml,maxDate:new Date}},defaultPresets:null===($=null==sl?void 0:sl.data)||void 0===$?void 0:$.dateFilters.defaultPreset,showLiveButton:"yes"===(null===(il=null===(ll=null==sl?void 0:sl.data)||void 0===ll?void 0:ll.dateFilters)||void 0===il?void 0:il.showLiveButton),showFilterButton:!Zl&&"yes"===(null===(el=null===(ol=null==sl?void 0:sl.data)||void 0===ol?void 0:ol.dateFilters)||void 0===el?void 0:el.showFilterButton),showFilterCount:!Zl&&"yes"===(null===(tl=null===(nl=null==sl?void 0:sl.data)||void 0===nl?void 0:nl.dateFilters)||void 0===tl?void 0:tl.showFilterCount),liveDuration:null===(al=null===(dl=null==sl?void 0:sl.data)||void 0===dl?void 0:dl.dateFilters)||void 0===al?void 0:al.liveDurationMs})})),Kl.map(function(l){return o(t.Fragment,{children:ql[l]},l)}),!Zl&&o(v,{visible:Fl,onHide:kl,onReset:wl,onApply:Bl,fields:null!==(vl=null===(ul=null===(rl=null==sl?void 0:sl.data)||void 0===rl?void 0:rl.sidebarFilters)||void 0===ul?void 0:ul.map(function(l){var i,o,e,n,t=l.schemaFilterName,d="Single select"===l.type?"singleSelect":"Multi select"===l.type?"multiSelect":"Date Range"===l.type?"dateRange":"Date"===l.type?"date":"text",a=null!==(o=null===(i=l.options)||void 0===i?void 0:i.map(function(l){return{label:l,value:l}}))&&void 0!==o?o:[];return{id:t,label:l.label,hint:l.description,type:d,placeholder:l.placeholder,options:a,value:"multiSelect"===d?null!==(e=xl[t])&&void 0!==e?e:[]:null!==(n=xl[t])&&void 0!==n?n:"",onChange:function(l){return Dl(t,l)}}}))&&void 0!==vl?vl:[]})]}))})}export{S as ExecutiveDashboard,S as default};
|
|
1
|
+
import{__assign as l,__spreadArray as i}from"../../_virtual/_tslib.js";import{jsx as o,Fragment as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as d}from"react";import{ChartLine as a}from"lucide-react";import r from"./DashboardDateFilter/DashboardDateFilter.js";import u from"./MetricCard/MetricCard.js";import v from"./FiltersSidebar/FiltersSidebar.js";import s from"./Graph/Graph.js";import c from"./Graph/GraphEmptyState.js";import{DATE_PRESET_MAP as p}from"./DashboardDateFilter/datePreset.js";import g from"./Table/TableCard.js";import m from"./Table/TableGrid/TableGrid.js";import{buildColumns as h,withRowIds as b}from"../utils/tableColumns.js";import{resolveSectionOrder as f,isSectionHidden as y}from"../utils/sectionOrder.js";import{getActiveFilterCount as C,isKpiValueObject as k,getKpiValueColor as F,getKpiDelta as w,formatKpiValue as x}from"../utils/index.js";import{getKpiIcon as B}from"../utils/kpiIcon.js";var D=["#7c3aed","#FFC130","#F43F5E","#10b981","#3b82f6"];function L(L){var S,j,P,O,A,T,E,M,R,V,G,H,z,I,W,K,q,N,Z,_,J,Q,U,X,Y,$,ll,il,ol,el,nl,tl,dl,al,rl,ul,vl,sl=L.uiConfig,cl=L.data,pl=L.dataLoading,gl=L.startDate,ml=L.endDate,hl=L.onDateChange,bl=L.onRefresh,fl=L.selectedKpis,yl=L.onKpiChange,Cl=L.sidebarVisible,kl=L.onSidebarShow,Fl=L.onSidebarHide,wl=L.filterValues,xl=L.onFilterChange,Bl=L.onFilterReset,Dl=L.onFilterApply,Ll=L.appliedFilters,Sl=L.graphEmptyState,jl=L.tables,Pl=L.tableLayout,Ol=L.sectionOrder,Al=L.hiddenSections,Tl=L.tablePages,El=L.onTableExpand,Ml=L.onTableLoadMore,Rl=L.pollingEnabled,Vl=void 0!==Rl&&Rl,Gl=L.selectedPreset,Hl=L.handlePresetChange,zl=L.metricCardConfig,Il=L.kpiCtaConfig,Wl=L.tableCtaConfig,Kl=null!==(P=null===(j=null===(S=null==sl?void 0:sl.data)||void 0===S?void 0:S.dateFilters)||void 0===j?void 0:j.datepresets)&&void 0!==P?P:[],ql=d(function(){return Kl.map(function(l){return p[l]}).filter(Boolean)},[JSON.stringify(Kl)]),Nl=d(function(){return C(Ll)},[Ll]),Zl=d(function(){var l,i,o=null==Pl?void 0:Pl.spans;if(o)return(null!==(i=null===(l=null==sl?void 0:sl.data)||void 0===l?void 0:l.tableBuilder)&&void 0!==i?i:[]).map(function(l,i){return Array.isArray(o)?o[i]:o[l.key]})},[null==Pl?void 0:Pl.spans,null===(O=null==sl?void 0:sl.data)||void 0===O?void 0:O.tableBuilder]),_l=o("div",l({style:{padding:"4px"}},{children:o(s,{loading:pl,emptyState:null!=Sl?Sl:o(c,{}),title:null===(A=null==sl?void 0:sl.data)||void 0===A?void 0:A.graphBuilder.title,description:null===(E=null===(T=null==sl?void 0:sl.data)||void 0===T?void 0:T.graphBuilder)||void 0===E?void 0:E.subtitle,icon:o(a,{size:18}),xAxis:{label:(null===(R=null===(M=null==sl?void 0:sl.data)||void 0===M?void 0:M.graphBuilder)||void 0===R?void 0:R.axis.xAxisLabel)||"Date"},style:{chartHeight:220},scrollable:Vl,panes:null===(V=null==sl?void 0:sl.data)||void 0===V?void 0:V.graphBuilder.tiers.map(function(l,i){var e,n,t,d,r,u,v,s,c,p,g,m,h=fl[l.key]||(null===(e=l.plotOptions[0])||void 0===e?void 0:e.key),b=cl.graph.tier.find(function(i){return i.key===l.key}),f=(null===(n=null==b?void 0:b.referenceOptions)||void 0===n?void 0:n[h])||{},y=(null===(t=null==b?void 0:b.plotbyoptions)||void 0===t?void 0:t[h])||{},C=(null==l?void 0:l.series)||[],k=Object.keys(y),F=l.plotOptions.find(function(l){return l.value===h});return{key:l.key,selector:{label:"Plot By",value:h,onChange:function(i){yl(l.key,i)},options:l.plotOptions.map(function(l){return{label:l.label,value:l.value}}),triggerIcon:o(a,{size:16,color:0===i?"green":"purple"})},yAxis:{label:null==F?void 0:F.yAxisLabel,beginAtZero:"false"!==(null==h?void 0:h.yAxisBeginAtZero)},tooltip:{formatHeading:function(l){return"".concat(l)}},legend:{position:(null===(u=null===(r=null===(d=null==sl?void 0:sl.data)||void 0===d?void 0:d.graphBuilder)||void 0===r?void 0:r.legend)||void 0===u?void 0:u.position)||"bottom",toggle:"yes"===(null===(c=null===(s=null===(v=null==sl?void 0:sl.data)||void 0===v?void 0:v.graphBuilder)||void 0===s?void 0:s.legend)||void 0===c?void 0:c.allowToggle),align:(null===(m=null===(g=null===(p=null==sl?void 0:sl.data)||void 0===p?void 0:p.graphBuilder)||void 0===g?void 0:g.legend)||void 0===m?void 0:m.alignment)||"center"},height:0===i?300:250,series:k.map(function(l,i){var o,e,n=(null===(e=null===(o=null==b?void 0:b.plotbyoptions)||void 0===o?void 0:o[h])||void 0===e?void 0:e[l])||[],t=D[i%D.length],d=C.find(function(i){return i.key===l});return{key:l,label:(null==d?void 0:d.name)||l,data:n,area:"yes"===(null==d?void 0:d.areaFill),curve:(null==d?void 0:d.curveType)||"linear",color:"#".concat(null==d?void 0:d.color)||t,dashed:"dashed"===(null==d?void 0:d.style),strokeWidth:parseInt(null==d?void 0:d.strokeWidth)||2,showPoints:"yes"===(null==d?void 0:d.showPoints),pointRadius:parseInt(null==d?void 0:d.pointRadius)||3,showInLegend:!0,valueFormatter:function(l){return"".concat(l)}}}),reference:f}})})})),Jl=o("div",l({style:{padding:"4px",display:"flex",gap:"10px",flexWrap:"wrap"}},{children:i([],null!==(H=null===(G=null==sl?void 0:sl.data)||void 0===G?void 0:G.kpiCards)&&void 0!==H?H:[],!0).sort(function(l,i){var o,e;return(null!==(o=l.displayOrder)&&void 0!==o?o:0)-(null!==(e=i.displayOrder)&&void 0!==e?e:0)}).map(function(l){var i,e,n,t=null===(i=null==cl?void 0:cl.kpiCards)||void 0===i?void 0:i[l.title],d=k(t)?F(t.currentValue,t.baselineValue,l.indicatorLogic):void 0,a=k(t)?w(t.currentValue,t.baselineValue,l.indicatorLogic):void 0,r=null!==(e=l.ctaKey)&&void 0!==e?e:l.key,v=r?null==Il?void 0:Il[r]:void 0;return o(u,{title:l.title,subtitle:l.subtitle,value:x(t,l.valueFormat),valueColor:d,delta:a&&{label:a.label,direction:a.direction,color:d},icon:B(l.icon),loading:pl,showDelta:null===(n=null==zl?void 0:zl.showDelta)||void 0===n||n,cta:{ctaEnabled:Boolean(l.showActionButton),ctaText:l.actionButtonLabel,ctaOnClick:function(){return null==v?void 0:v(l)}}},l.title)})})),Ql=(null!==(W=null===(I=null===(z=null==sl?void 0:sl.data)||void 0===z?void 0:z.tableBuilder)||void 0===I?void 0:I.length)&&void 0!==W?W:0)>0?o("div",l({style:{padding:"4px"}},{children:o(m,l({itemSpans:Zl,totalColumns:null!==(K=null==Pl?void 0:Pl.totalColumns)&&void 0!==K?K:12,defaultSpan:null==Pl?void 0:Pl.defaultSpan,options:null!==(q=null==Pl?void 0:Pl.options)&&void 0!==q?q:[1,2,3],defaultColumns:null==Pl?void 0:Pl.defaultColumns,columns:null==Pl?void 0:Pl.columns,onColumnsChange:null==Pl?void 0:Pl.onColumnsChange,showToggle:(null===(N=null==Pl?void 0:Pl.showToggle)||void 0===N||N)&&(null!==(J=null===(_=null===(Z=null==sl?void 0:sl.data)||void 0===Z?void 0:Z.tableBuilder)||void 0===_?void 0:_.length)&&void 0!==J?J:0)>1,toggleLabel:null==Pl?void 0:Pl.toggleLabel,minColumnWidth:null!==(Q=null==Pl?void 0:Pl.minColumnWidth)&&void 0!==Q?Q:380,gap:null!==(U=null==Pl?void 0:Pl.gap)&&void 0!==U?U:12,equalHeights:null===(X=null==Pl?void 0:Pl.equalHeights)||void 0===X||X},{children:sl.data.tableBuilder.map(function(i){var e,n,d,a=null!==(n=null===(e=null==cl?void 0:cl.table)||void 0===e?void 0:e[i.key])&&void 0!==n?n:[],r=null==Tl?void 0:Tl[i.key],u=!!(null==r?void 0:r.loaded),v=u?r.rows:a,s=!u&&i.rowLimit&&i.rowLimit>0?a.slice(0,i.rowLimit):v,c=null==jl?void 0:jl[i.key],p=h(i,c),m=null==c?void 0:c.card,f=null==m?void 0:m.icon,y=B(i.icon),C=y&&t.isValidElement(y)?t.cloneElement(y,l(l({},null!=(null==f?void 0:f.size)?{size:f.size}:{}),(null==f?void 0:f.color)?{color:f.color}:{})):y,k=f?l(l(l({width:"auto",height:"auto"},f.color?{color:f.color}:{}),f.background?{background:f.background,padding:6,borderRadius:8}:{}),f.style):void 0,F=null!==(d=i.ctaKey)&&void 0!==d?d:i.key,w=F?null==Wl?void 0:Wl[F]:void 0;return o(g,{title:i.title,icon:C,styles:{root:null==m?void 0:m.root,header:null==m?void 0:m.header,title:null==m?void 0:m.title,icon:k},cta:{ctaEnabled:Boolean(i.showActionButton),ctaText:i.actionButtonLabel,ctaOnClick:function(){return null==w?void 0:w(i)}},onExpand:function(l){return null==El?void 0:El(i.key,l)},table:{rows:b(s),columns:p,loading:pl,loadingMore:null==r?void 0:r.loading,hasMore:null==r?void 0:r.hasMore,onLoadMore:r?function(){return null==Ml?void 0:Ml(i.key)}:void 0,tableProps:null==c?void 0:c.tableProps}},i.key)})}))})):null,Ul={graphBuilder:_l,kpiCards:Jl,tableBuilder:Ql},Xl=f(Ol,Al,null===(Y=null==sl?void 0:sl.data)||void 0===Y?void 0:Y.sectionOrder,Object.keys(Ul)),Yl=y(Al,"dateFilters"),$l=y(Al,"sidebarFilters");return o(e,{children:n("div",l({style:{display:"flex",flexDirection:"column",gap:12,width:"100%"}},{children:[!Yl&&o("div",l({style:{padding:"4px"}},{children:o(r,{filterCount:Nl,initialStartDate:gl,initialEndDate:ml,onDateChange:hl,onRefresh:bl,onFilterClick:kl,presets:ql,datePickerProps:{from:{minDate:new Date(2025,0,1),maxDate:new Date},to:{minDate:gl,maxDate:new Date}},defaultPresets:null===($=null==sl?void 0:sl.data)||void 0===$?void 0:$.dateFilters.defaultPreset,showLiveButton:"yes"===(null===(il=null===(ll=null==sl?void 0:sl.data)||void 0===ll?void 0:ll.dateFilters)||void 0===il?void 0:il.showLiveButton),showFilterButton:!$l&&"yes"===(null===(el=null===(ol=null==sl?void 0:sl.data)||void 0===ol?void 0:ol.dateFilters)||void 0===el?void 0:el.showFilterButton),showFilterCount:!$l&&"yes"===(null===(tl=null===(nl=null==sl?void 0:sl.data)||void 0===nl?void 0:nl.dateFilters)||void 0===tl?void 0:tl.showFilterCount),liveDuration:null===(al=null===(dl=null==sl?void 0:sl.data)||void 0===dl?void 0:dl.dateFilters)||void 0===al?void 0:al.liveDurationMs,pollingEnabled:Vl,selectedPreset:Gl,handlePresetChange:Hl})})),Xl.map(function(l){return o(t.Fragment,{children:Ul[l]},l)}),!$l&&o(v,{visible:Cl,onHide:Fl,onReset:Bl,onApply:Dl,fields:null!==(vl=null===(ul=null===(rl=null==sl?void 0:sl.data)||void 0===rl?void 0:rl.sidebarFilters)||void 0===ul?void 0:ul.map(function(l){var i,o,e,n,t=l.schemaFilterName,d="Single select"===l.type?"singleSelect":"Multi select"===l.type?"multiSelect":"Date Range"===l.type?"dateRange":"Date"===l.type?"date":"text",a=null!==(o=null===(i=l.options)||void 0===i?void 0:i.map(function(l){return{label:l,value:l}}))&&void 0!==o?o:[];return{id:t,label:l.label,hint:l.description,type:d,placeholder:l.placeholder,options:a,value:"multiSelect"===d?null!==(e=wl[t])&&void 0!==e?e:[]:null!==(n=wl[t])&&void 0!==n?n:"",onChange:function(l){return xl(t,l)}}}))&&void 0!==vl?vl:[]})]}))})}export{L as ExecutiveDashboard,L as default};
|
|
2
2
|
//# sourceMappingURL=ExecutiveDashboard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as
|
|
1
|
+
import{__assign as e,__spreadArray as l}from"../../../_virtual/_tslib.js";import{jsxs as n,jsx as i,Fragment as r}from"react/jsx-runtime";import{useId as o,useState as t,useMemo as a}from"react";import s from"./LineChart.js";import c from"./GraphSkeleton.js";import d from"./PlotBySelector.js";import{colorForIndex as u}from"./types.js";function v(e){var l,n,r,o=e.config,a=void 0!==o.value,s=t(null!==(l=o.defaultValue)&&void 0!==l?l:null===(r=null===(n=o.options)||void 0===n?void 0:n[0])||void 0===r?void 0:r.value),c=s[0],u=s[1],v=a?o.value:c;return i(d,{config:o,value:v,onChange:function(e){var l;a||u(e),null===(l=o.onChange)||void 0===l||l.call(o,e)}})}function h(l){var r,o=l.pane,t=l.xAxis,a=l.sharedStyle,c=l.isLast,d=l.hiddenKeys,u=l.toggleSeries,v=l.syncId,h=l.reference,f=l.scrollable,m=void 0!==f&&f,p=l.onPointClick,g=c?t:e(e({},t),{show:!1,label:void 0});return n("div",e({className:"ellm-graph__pane"},{children:[o.title&&i("div",e({className:"ellm-graph__pane-title"},{children:o.title})),i(s,{series:o.series,hiddenKeys:d,onToggleSeries:u,xAxis:g,yAxis:o.yAxis,tooltip:o.tooltip,legend:{show:!0},syncId:v,style:e(e({},a),{chartHeight:null!==(r=o.height)&&void 0!==r?r:null==a?void 0:a.chartHeight}),reference:h,scrollable:m,onPointClick:p})]}))}function f(d){var f,m,p=d.series,g=d.panes,y=d.title,_=d.description,x=d.icon,N=d.plotBy,A=d.xAxis,k=d.yAxis,S=d.tooltip,b=d.legend,C=d.config,w=d.style,j=d.emptyState,P=d.loading,E=d.scrollable,H=void 0!==E&&E,I=d.onPointClick,K=!!(null==g?void 0:g.length),L=o(),B=t(function(){var e=new Set;return(null!=p?p:[]).forEach(function(l){return l.hidden&&e.add(l.key)}),(null!=g?g:[]).forEach(function(l){return l.series.forEach(function(l){return l.hidden&&e.add(l.key)})}),e}),G=B[0],T=B[1],W=function(e){return T(function(l){var n=new Set(l);return n.has(e)?n.delete(e):n.add(e),n})},M=!1!==(null==C?void 0:C.showHeader),V=a(function(){return K?g.some(function(e){return e.series.some(function(e){var l,n;return null===(n=null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.some)||void 0===n?void 0:n.call(l,function(e){return null!=(null==e?void 0:e.y)})})}):(null!=p?p:[]).some(function(e){return e.data.some(function(e){return null!=e.y})})},[K,g,p]),q=a(function(){var l;if(!K)return w;var n=null!==(l=null==w?void 0:w.yAxisWidth)&&void 0!==l?l:g.some(function(e){var l;return null===(l=e.yAxis)||void 0===l?void 0:l.label})?64:48;return e(e({},w),{yAxisWidth:n})},[K,g,w]);a(function(){if(!K)return[];var e=[];return g.forEach(function(l){var n;!1!==(null===(n=l.legend)||void 0===n?void 0:n.show)&&l.series.forEach(function(l,n){var i;!1!==l.showInLegend&&e.push({key:l.key,label:l.label,color:null!==(i=l.color)&&void 0!==i?i:u(null==q?void 0:q.colors,n)})})}),e},[K,g,null==q?void 0:q.colors]);var z=l(l([],N?[N]:[],!0),K?g.flatMap(function(e){return e.selector?[e.selector]:[]}):[],!0),D=y||_||x||z.length>0;return n("div",e({className:"ellm-graph".concat((null==w?void 0:w.className)?" ".concat(w.className):""),style:null==w?void 0:w.container},{children:[M&&D&&n("div",e({className:"ellm-graph__header"},{children:[n("div",e({className:"ellm-graph__heading"},{children:[x&&i("span",e({className:"ellm-graph__icon"},{children:x})),n("div",{children:[y&&i("div",e({className:"ellm-graph__title"},{children:y})),_&&i("div",e({className:"ellm-graph__description"},{children:_}))]})]})),z.length>0&&i("div",e({className:"ellm-graph__controls"},{children:z.map(function(e,l){return i(v,{config:e},l)})}))]})),P?i(c,{height:null==w?void 0:w.chartHeight}):!V&&j?i("div",e({className:"ellm-graph__empty"},{children:j})):K?n(r,{children:[i("div",e({className:"ellm-graph__panes",style:{gap:null!==(f=null==w?void 0:w.paneGap)&&void 0!==f?f:12}},{children:g.map(function(e,l){var n;return i(h,{pane:e,xAxis:A,sharedStyle:q,isLast:l===g.length-1,hiddenKeys:G,toggleSeries:W,syncId:L,reference:e.reference,scrollable:H,onPointClick:I},null!==(n=e.key)&&void 0!==n?n:"pane-".concat(l))})})),!1]}):i(s,{series:null!=p?p:[],hiddenKeys:G,onToggleSeries:W,xAxis:A,yAxis:k,tooltip:S,legend:b,style:w,reference:null===(m=null==g?void 0:g[0])||void 0===m?void 0:m.reference,scrollable:H,onPointClick:I})]}))}export{f as default};
|
|
2
2
|
//# sourceMappingURL=Graph.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as
|
|
1
|
+
import{__spreadArray as e,__assign as n}from"../../../_virtual/_tslib.js";import{jsx as l,jsxs as i}from"react/jsx-runtime";import{useState as o,useMemo as r}from"react";import{ComposedChart as t,CartesianGrid as a,XAxis as u,YAxis as d,ReferenceArea as c,ReferenceLine as v,Area as s,Line as f}from"recharts";import{ChartContainer as h,ChartTooltip as y,ChartTooltipContent as m,ChartLegend as p,ChartLegendContent as g}from"../ui/chart.js";import{colorForIndex as k}from"./types.js";import{compactNumber as x}from"../../utils/index.js";import b from"./Seperator.js";var w=function(e){return"number"==typeof e&&!Number.isNaN(e)},A=function(e){switch(e){case"linear":return"linear";case"step":return"stepAfter";default:return"monotone"}};function C(C){var L,S,T,F,E,K,N,I,P,W=C.series,j=C.hiddenKeys,D=C.onToggleSeries,M=C.xAxis,R=C.yAxis,z=C.tooltip,_=C.legend,B=C.style,H=C.syncId,O=C.reference;C.scrollable;var G=C.onPointClick,V=null!==(L=null==B?void 0:B.chartHeight)&&void 0!==L?L:300,Z=null!==(S=null==B?void 0:B.gridColor)&&void 0!==S?S:"#eef0f4",q=null!==(T=null==B?void 0:B.axisColor)&&void 0!==T?T:"#d7dbe3",J=null!==(F=null==B?void 0:B.axisLabelColor)&&void 0!==F?F:"#6b7280",Q=null!==(E=null==B?void 0:B.tickColor)&&void 0!==E?E:"#9ca3af",U=null!==(K=null==B?void 0:B.fontFamily)&&void 0!==K?K:"Inter, system-ui, -apple-system, sans-serif",X=o(null),Y=X[0],$=X[1],ee=r(function(){var n,l,i;if(null===(n=null==M?void 0:M.categories)||void 0===n?void 0:n.length)return{categories:M.categories,xType:null!==(l=M.type)&&void 0!==l?l:"category"};var o=new Set,r=[];W.forEach(function(e){return e.data.forEach(function(e){o.has(e.x)||(o.add(e.x),r.push(e.x))})});var t=r.every(w),a=null!==(i=null==M?void 0:M.type)&&void 0!==i?i:t?"number":"category";return{categories:"number"===a?e([],r,!0).sort(function(e,n){return Number(e)-Number(n)}):r,xType:a}},[W,null==M?void 0:M.categories,null==M?void 0:M.type]),ne=ee.categories,le=ee.xType,ie=r(function(){var e=new Map;return W.forEach(function(n){var l=new Map;n.data.forEach(function(e){return l.set(e.x,e.y)}),e.set(n.key,l)}),ne.map(function(n){var l={x:n};return W.forEach(function(i){var o,r=null===(o=e.get(i.key))||void 0===o?void 0:o.get(n);l[i.key]=null==r?null:r}),l})},[W,ne]),oe=r(function(){var e={},n=W.map(function(n,l){var i,o=null!==(i=n.color)&&void 0!==i?i:k(null==B?void 0:B.colors,l);return e[n.key]={label:n.label,color:o},{series:n,color:o,index:l}});return{chartConfig:e,resolved:n}},[W,null==B?void 0:B.colors]),re=oe.chartConfig,te=oe.resolved,ae=r(function(){var e={};return W.forEach(function(n){n.valueFormatter&&(e[n.key]=function(e,l){var i;return n.valueFormatter(e,null!==(i=null==l?void 0:l.payload)&&void 0!==i?i:{x:null==l?void 0:l.x,y:e})})}),e},[W]),ue=!1!==(null==z?void 0:z.enabled),de=(null==z?void 0:z.seriesKeys)?new Set(z.seriesKeys):null,ce=!1!==(null==_?void 0:_.show),ve="top"===(null==_?void 0:_.position)?"top":"bottom",se="start"===(null==_?void 0:_.align)?"left":"end"===(null==_?void 0:_.align)?"right":"center",fe=!1!==(null==M?void 0:M.show),he=!1!==(null==R?void 0:R.show),ye=!1!==(null==B?void 0:B.showGrid),me=!!(null==B?void 0:B.showVerticalGrid),pe=r(function(){return Math.max.apply(Math,ie.flatMap(function(e){return W.map(function(n){return Number(e[n.key])||0})}))},[ie]),ge=r(function(){return Math.ceil(1.1*pe)},[pe]),ke=[null!=(null==R?void 0:R.min)?R.min:!1!==(null==R?void 0:R.beginAtZero)?0:"auto",null!=(null==R?void 0:R.max)?R.max:ge],xe=null!==(N=null==B?void 0:B.yAxisWidth)&&void 0!==N?N:(null==R?void 0:R.label)?64:48,be={top:12,right:16,bottom:8,left:null!=(null==B?void 0:B.yAxisWidth)?0:(null==R?void 0:R.label)?16:0},we=null!==(I=null==M?void 0:M.enableScroll)&&void 0!==I&&I,Ae=null!==(P=null==M?void 0:M.minTickGap)&&void 0!==P?P:2;r(function(){if(!we||!Y||ne.length<=1)return"100%";var e=(ne.length-1)*Ae+200;return e>Y-xe-be.left-be.right?"".concat(e,"px"):"100%"},[we,Y,ne.length,Ae,xe,be]);return l(h,n({config:re,style:{height:V,fontFamily:U},ref:function(e){e&&null===Y&&$(e.clientWidth)}},{children:function(){var e,o;return i(t,n({data:ie,margin:be,syncId:H},{children:[l(a,{vertical:me,horizontal:ye,stroke:Z}),l(u,{dataKey:"x",type:"number"===le?"number":"category",hide:!fe,height:(null==M?void 0:M.label)?52:void 0,tickLine:!1,axisLine:!(null==M?void 0:M.hideLine)&&{stroke:q},tickMargin:8,interval:"preserveStartEnd",tick:{fill:Q,fontSize:11},tickFormatter:(null==M?void 0:M.formatTick)?function(e,n){return M.formatTick(e,n)}:void 0,label:(null==O?void 0:O.showReferenceAreaLabel)?function(e){return function(e){var o=e.viewBox;e.startTick,e.endTick;var r=o.x,t=o.y,a=o.width,u=1;if((null==O?void 0:O.showReferenceArea)&&null!=(null==O?void 0:O.referencePoint)&&ne.length>1){var d=ne.indexOf(O.referencePoint);-1!==d&&(u=d/(ne.length-1))}var c=100*u,v=100-c;return l("foreignObject",n({x:r,y:t+24,width:a,height:40},{children:i("div",n({className:"ellm-graph__liveLabelContainer"},{children:[(null==O?void 0:O.referenceAreaLabel)&&i("div",n({style:{flex:c,display:"flex",alignItems:"center"}},{children:[l(b,{}),l("span",n({style:{padding:"0 12px",color:"#6b7280",fontSize:"12px"}},{children:null==O?void 0:O.referenceAreaLabel})),l(b,{})]})),v>0&&i("div",n({style:{flex:v,display:"flex",alignItems:"center"}},{children:[l(b,{style:{backgroundColor:"#DC2626"}}),i("div",n({className:"ellm-graph__liveLabel"},{children:[l(b,{style:{width:"8px",height:"8px",borderRadius:"100%",backgroundColor:"#DC2626",flex:"auto"},pulse:!0}),"LIVE - ",null==O?void 0:O.referenceAreaLiveLabel]})),l(b,{style:{backgroundColor:"#DC2626"}})]}))]}))}))}(n(n({},e),{startTick:ne[0],endTick:ne[ne.length-1]}))}:(null==M?void 0:M.label)?{value:M.label,position:"insideBottom",offset:4,fill:J,fontSize:12,fontWeight:500}:void 0}),l(d,{hide:!he,domain:ke,tickLine:!1,axisLine:!1===(null==R?void 0:R.hideLine)&&{stroke:q},tickCount:null==R?void 0:R.tickCount,width:xe,tick:{fill:Q,fontSize:11},tickFormatter:(null==R?void 0:R.formatTick)?function(e,n){return R.formatTick(e,n)}:function(e){return"number"==typeof e?x(e):String(e)},label:(null==R?void 0:R.label)?{value:R.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"},fill:J,fontSize:12,fontWeight:500}:void 0}),ue&&l(y,{cursor:{stroke:q,strokeDasharray:"4 4"},content:function(e){var i,o=(null!==(i=e.payload)&&void 0!==i?i:[]).filter(function(e){var n=W.find(function(n){return n.key===e.dataKey});return!1!==(null==n?void 0:n.showInTooltip)&&!(de&&!de.has(String(e.dataKey)))});return(null==z?void 0:z.render)?z.render({x:e.label,points:o.map(function(n){var l;return{series:W.find(function(e){return e.key===n.dataKey}),value:null!==(l=n.value)&&void 0!==l?l:null,point:{x:e.label,y:n.value},color:n.color}})}):l(m,n({},e,{payload:o,hideLabel:!1===(null==z?void 0:z.showHeading),valueFormatters:ae,labelFormatter:(null==z?void 0:z.formatHeading)?function(e){return z.formatHeading(e)}:void 0}))}}),ce&&l(p,{verticalAlign:ve,content:function(e){return l(g,n({},e,{verticalAlign:ve,align:se,hiddenKeys:j,onItemClick:!1!==(null==_?void 0:_.toggle)&&D?D:void 0}))}}),(null==O?void 0:O.showReferenceArea)&&null!=(null==O?void 0:O.referencePoint)&&l(c,{x1:O.referencePoint,fill:null!==(e=O.referenceAreaFill)&&void 0!==e?e:"#2563EB1A"}),(null==O?void 0:O.showReferenceArea)&&null!=O.referencePoint&&l(v,{x:O.referencePoint,stroke:null!==(o=O.referenceLineStroke)&&void 0!==o?o:"#3B82F6",strokeDasharray:"4 4"}),te.map(function(e){var i,o,r,t,a=e.series,u=j.has(a.key),d="var(--color-".concat(a.key,")"),c=!0===a.dashed?"6 5":"string"==typeof a.dashed?a.dashed:void 0,v=!1!==a.showPoints&&{r:null!==(i=a.pointRadius)&&void 0!==i?i:3,fill:"#fff",stroke:d,strokeWidth:2},h={r:(null!==(o=a.pointRadius)&&void 0!==o?o:3)+2,onClick:G?function(e,n){var l,i;return function(e,n,l){if(G){var i=W.find(function(n){return n.key===e});i&&G({series:i,point:{x:null==n?void 0:n.x,y:null==n?void 0:n[e]},index:l})}}(a.key,null!==(l=null==n?void 0:n.payload)&&void 0!==l?l:n,null!==(i=null==n?void 0:n.index)&&void 0!==i?i:0)}:void 0},y={key:a.key,dataKey:a.key,name:a.key,type:A(a.curve),stroke:d,strokeWidth:null!==(r=a.strokeWidth)&&void 0!==r?r:2,strokeDasharray:c,connectNulls:!1,isAnimationActive:!1,hide:u,dot:v,activeDot:h};return a.area?l(s,n({},y,{fill:d,fillOpacity:null!==(t=a.areaOpacity)&&void 0!==t?t:.12})):l(f,n({},y))})]}))}()}))}export{C as default};
|
|
2
2
|
//# sourceMappingURL=LineChart.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";var t=function(t){var a=t.style,l=t.pulse;return r("div",{className:" ".concat(l&&"pulse"),style:e({flex:1,height:"1px",backgroundColor:"#e5e7eb"},a)})};export{t as default};
|
|
2
|
+
//# sourceMappingURL=Seperator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Seperator.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as l,jsx as a,Fragment as i}from"react/jsx-runtime";import c from"react";import{ArrowUp as t,ArrowDown as n,ArrowRight as r}from"lucide-react";var d=function(d){var o,s,m,u,v,_,p=d.title,h=d.value,N=d.subtitle,f=d.icon,g=d.loading,b=d.valuePrefix,x=d.valueColor,y=d.delta,k=d.cta,C=d.segments,W=d.onClick,w=d.classNames,z=d.showDelta,E=void 0===z||z,V=Boolean((null==k?void 0:k.ctaEnabled)&&(null==k?void 0:k.ctaText)),j=C&&C.length>0,D=j?C.reduce(function(e,l){return e+l.value},0):0;return l("div",e({className:"metric-card ".concat(null!==(o=null==w?void 0:w.root)&&void 0!==o?o:""),onClick:W},{children:[l("div",e({className:"metric-card__content ".concat(j?"metric-card__content--has-segments":"")},{children:[l("div",e({style:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%",gap:"4px"}},{children:[a("div",e({className:"metric-card__title"},{children:p})),l("div",e({style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap"}},{children:[a("div",e({className:"metric-card__value ".concat(null!==(s=null==w?void 0:w.value)&&void 0!==s?s:""),style:{color:null!=x?x:null==b?void 0:b.color}},{children:g?a("span",{className:"metric-card__value-skeleton"}):l(i,{children:[(null==b?void 0:b.icon)&&(c.isValidElement(b.icon)?c.cloneElement(b.icon,{size:20,strokeWidth:2.5}):b.icon),h]})})),!g&&y&&"0%"!==y.label&&E&&l("div",e({className:"metric-card__delta",style:{color:y.color}},{children:["flat"!==y.direction&&("up"===y.direction?a(t,{size:14,strokeWidth:3,"aria-hidden":!0}):a(n,{size:14,strokeWidth:3,"aria-hidden":!0})),a("span",{children:y.label}),y.caption&&a("span",e({className:"metric-card__delta-caption"},{children:y.caption}))]}))]})),N&&a("div",e({className:"metric-card__subtitle ".concat(null!==(m=null==w?void 0:w.subtitle)&&void 0!==m?m:"")},{children:N}))]})),j&&l("div",e({className:"".concat(null!==(u=null==w?void 0:w.segments)&&void 0!==u?u:""),style:{display:"flex",flexDirection:"column",flex:1,margin:0}},{children:[a("div",e({className:"metric-card__stats",style:{margin:"10px"}},{children:C.map(function(i,c){return l("div",e({className:"metric-card__stat"},{children:[l("div",e({className:"metric-card__stat-label"},{children:[a("span",{className:"metric-card__dot",style:{background:i.color}}),i.label]})),a("div",e({className:"metric-card__stat-value"},{children:void 0!==i.displayValue?i.displayValue:"".concat(i.value).concat(i.percentage?"%":"")})),c<C.length-1&&a("div",{className:"metric-card__divider"})]}),i.label)})})),a("div",e({className:"metric-card__progress",style:{marginTop:"4px"}},{children:C.map(function(e){return a("div",{className:"metric-card__progress-segment",style:{width:D>0?"".concat(e.value/D*100,"%"):"0%",background:e.color}},e.label)})}))]})),f&&a("div",e({className:"metric-card__icon-container ".concat(null!==(v=null==w?void 0:w.icon)&&void 0!==v?v:"")},{children:c.isValidElement(f)?c.cloneElement(f,{size:25,strokeWidth:2.5}):f}))]})),V&&a("div",e({className:"metric-card__cta-row"},{children:l("button",e({type:"button",className:"metric-card__cta ".concat(null!==(_=null==w?void 0:w.cta)&&void 0!==_?_:""),onClick:function(e){var l;e.stopPropagation(),null===(l=null==k?void 0:k.ctaOnClick)||void 0===l||l.call(k)}},{children:[null==k?void 0:k.ctaText,a(r,{size:14,strokeWidth:2,"aria-hidden":!0})]}))}))]}))};export{d as default};
|
|
2
2
|
//# sourceMappingURL=MetricCard.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as l,__assign as e,__rest as n}from"../../../_virtual/_tslib.js";import{jsxs as i,jsx as t,Fragment as a}from"react/jsx-runtime";import{useState as o,useMemo as r}from"react";import{PieChart as u,Pie as c,Cell as d,Sector as s}from"recharts";import{ChartContainer as v,ChartTooltip as m}from"../ui/chart.js";import{compactNumber as h}from"../../utils/index.js";import p from"./PieChartEmptyState.js";import f from"./PieChartSkeleton.js";import _ from"./PieChartTooltip.js";import{DEFAULT_PIE_COLOR as g}from"./types.js";import{isPlottableSlice as y,resolveSliceColors as N,sumSlices as b,percentOf as x}from"./utils.js";function R(R){var w,j,A,k,C,H,F,M,P=R.data,S=R.title,O=R.titleSuffix,E=R.description,B=R.icon,D=R.headerActions,I=R.color,K=void 0===I?g:I,L=R.shadeMode,T=void 0===L?"rank":L,V=R.center,Y=R.legend,q=R.tooltip,z=R.config,G=R.style,J=R.valueFormatter,Q=R.loading,U=R.emptyState,W=R.onSliceClick,X=o(null),Z=X[0],$=X[1],ll=null!==(w=null==G?void 0:G.chartHeight)&&void 0!==w?w:260,el=null!==(j=null==G?void 0:G.fontFamily)&&void 0!==j?j:"Inter, system-ui, -apple-system, sans-serif",nl="donut"===(null!==(A=null==z?void 0:z.variant)&&void 0!==A?A:"donut"),il=!1!==(null==z?void 0:z.showHeader),tl=!1!==(null==z?void 0:z.highlightOnHover),al=!1!==(null==z?void 0:z.animate),ol=null!==(k=null==z?void 0:z.sortBy)&&void 0!==k?k:"desc",rl=null!==(C=null==Y?void 0:Y.position)&&void 0!==C?C:"right",ul=!1!==(null==Y?void 0:Y.show),cl=r(function(){var e=(null!=P?P:[]).filter(function(l){return y(l.value)});if("none"===ol)return e;var n="asc"===ol?1:-1;return l([],e,!0).sort(function(l,e){return(l.value-e.value)*n})},[P,ol]),dl=r(function(){return N(cl,K,T,null==G?void 0:G.shadeRange)},[cl,K,T,null==G?void 0:G.shadeRange]),sl=r(function(){return b(cl)},[cl]),vl=r(function(){return cl.map(function(l,e){return{label:l.label,value:l.value,__index:e}})},[cl]),ml=r(function(){return{value:{label:"Value",color:K}}},[K]),hl=function(l){var e=cl[l];return e&&y(e.value)?{datum:e,value:e.value,color:dl[l],index:l,total:sl,percent:x(e.value,sl)}:null},pl=function(l){if(W){var e=hl(l);e&&W(e)}},fl=function(l,e){return J?J(l,e):h(l)},_l=function(l){var e;return"".concat(x(l,sl).toFixed(null!==(e=null==Y?void 0:Y.percentDecimals)&&void 0!==e?e:0),"%")},gl=null!=Z?cl[Z]:void 0,yl=!1!==(null==V?void 0:V.followHover),Nl=nl&&!1!==(null==V?void 0:V.show),bl=gl&&yl?fl(gl.value,gl):null!==(H=null==V?void 0:V.value)&&void 0!==H?H:fl(sl),xl=gl&&yl?gl.label:null!==(F=null==V?void 0:V.label)&&void 0!==F?F:"Total",Rl=cl.length>0,wl=null!==(M=null==G?void 0:G.activeOffset)&&void 0!==M?M:6,jl=S||E||B||D;return i("div",e({className:"ellm-pie-chart".concat((null==G?void 0:G.className)?" ".concat(G.className):""),style:null==G?void 0:G.container},{children:[il&&jl&&i("div",e({className:"ellm-pie-chart__header"},{children:[i("div",e({className:"ellm-pie-chart__heading"},{children:[B&&t("span",e({className:"ellm-pie-chart__icon"},{children:B})),i("div",{children:[S&&i("div",e({className:"ellm-pie-chart__title"},{children:[S,O&&t("span",e({className:"ellm-pie-chart__title-suffix"},{children:O}))]})),E&&t("div",e({className:"ellm-pie-chart__description"},{children:E}))]})]})),D&&t("div",e({className:"ellm-pie-chart__actions"},{children:D}))]})),Q?t(f,{height:ll,rows:Math.max(cl.length||6,3),legendPosition:rl}):Rl?i("div",e({className:"ellm-pie-chart__body ellm-pie-chart__body--".concat(rl)},{children:[i("div",e({className:"ellm-pie-chart__plot",style:{height:ll}},{children:[t(v,e({config:ml,style:{height:ll,fontFamily:el}},{children:function(){var l,o,r,v,h,p,f;return i(u,e({margin:{top:4,right:4,bottom:4,left:4}},{children:[!1!==(null==q?void 0:q.enabled)&&t(m,{content:function(l){var e,n,i,o=null===(i=null===(n=null===(e=null==l?void 0:l.payload)||void 0===e?void 0:e[0])||void 0===n?void 0:n.payload)||void 0===i?void 0:i.__index,r="number"==typeof o?hl(o):null;return r?(null==q?void 0:q.render)?t(a,{children:q.render(r)}):t(_,{ctx:r,config:q,valueFormatter:J}):null}}),t(c,e({data:vl,dataKey:"value",nameKey:"label",cx:"50%",cy:"50%",innerRadius:nl?null!==(l=null==G?void 0:G.innerRadius)&&void 0!==l?l:"55%":0,outerRadius:null!==(o=null==G?void 0:G.outerRadius)&&void 0!==o?o:"85%",paddingAngle:null!==(r=null==G?void 0:G.paddingAngle)&&void 0!==r?r:0,cornerRadius:null!==(v=null==G?void 0:G.cornerRadius)&&void 0!==v?v:0,startAngle:null!==(h=null==z?void 0:z.startAngle)&&void 0!==h?h:90,endAngle:(null!==(p=null==z?void 0:z.startAngle)&&void 0!==p?p:90)-360,stroke:"none",isAnimationActive:al,animationDuration:600,activeIndex:null!=Z?Z:void 0,activeShape:(f=wl,function(l){var i=l.outerRadius,a=void 0===i?0:i,o=n(l,["outerRadius"]);return t(s,e({},o,{outerRadius:a+f}))}),onMouseEnter:function(l,e){return $(e)},onMouseLeave:function(){return $(null)},onClick:function(l,e){return pl(e)},className:W?"ellm-pie-chart__pie--clickable":void 0},{children:vl.map(function(l,e){var n,i=tl&&null!==Z&&Z!==e;return t(d,{className:"ellm-pie-chart__slice",fill:dl[e],fillOpacity:i?null!==(n=null==G?void 0:G.dimOpacity)&&void 0!==n?n:.45:1},"".concat(l.label,"-").concat(e))})}))]}))}()})),Nl&&i("div",e({className:"ellm-pie-chart__center","aria-hidden":!0},{children:[t("div",e({className:"ellm-pie-chart__center-value"},{children:bl})),t("div",e({className:"ellm-pie-chart__center-label"},{children:xl}))]}))]})),ul&&t("div",e({className:"ellm-pie-chart__legend",style:(null==Y?void 0:Y.maxHeight)?{maxHeight:Y.maxHeight,overflowY:"auto"}:void 0},{children:cl.map(function(l,n){return i("button",e({type:"button",className:"ellm-pie-chart__legend-row".concat(null!==Z&&Z!==n?" ellm-pie-chart__legend-row--off":""),onMouseEnter:function(){return $(n)},onMouseLeave:function(){return $(null)},onFocus:function(){return $(n)},onBlur:function(){return $(null)},onClick:function(){return pl(n)}},{children:[t("span",{className:"ellm-pie-chart__legend-dot",style:{background:dl[n]}}),t("span",e({className:"ellm-pie-chart__legend-label",title:l.label},{children:l.label})),!1!==(null==Y?void 0:Y.showValue)&&t("span",e({className:"ellm-pie-chart__legend-value"},{children:fl(l.value,l)})),!1!==(null==Y?void 0:Y.showPercent)&&t("span",e({className:"ellm-pie-chart__legend-percent"},{children:_l(l.value)}))]}),"".concat(l.label,"-").concat(n))})}))]})):t("div",e({className:"ellm-pie-chart__empty"},{children:null!=U?U:t(p,{})}))]}))}export{R as default};
|
|
2
|
+
//# sourceMappingURL=PieChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChart.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{PieChart as r}from"lucide-react";function a(a){var l=a.title,d=void 0===l?"No data to display":l,s=a.description,c=void 0===s?"There's no data for the selected date range and filters. Try adjusting your filters or picking a different range.":s;return t("div",e({className:"ellm-pie-chart__empty-default"},{children:[i("span",e({className:"ellm-pie-chart__empty-icon"},{children:i(r,{size:22})})),i("div",e({className:"ellm-pie-chart__empty-title"},{children:d})),i("div",e({className:"ellm-pie-chart__empty-desc"},{children:c}))]}))}export{a as default};
|
|
2
|
+
//# sourceMappingURL=PieChartEmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChartEmptyState.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as l,jsx as i}from"react/jsx-runtime";function t(t){var a=t.height,r=void 0===a?260:a,s=t.rows,m=void 0===s?6:s,n=t.legendPosition,c=void 0===n?"right":n,h=Math.min(r-24,200);return l("div",e({className:"ellm-pie-chart__skeleton ellm-pie-chart__skeleton--".concat(c),"aria-busy":"true","aria-live":"polite",style:{minHeight:r}},{children:[i("div",e({className:"ellm-pie-chart__skeleton-plot"},{children:i("span",{className:"ellm-pie-chart__skeleton-ring ellm-pie-chart__shimmer",style:{width:h,height:h}})})),i("div",e({className:"ellm-pie-chart__skeleton-legend"},{children:Array.from({length:m}).map(function(t,a){return l("div",e({className:"ellm-pie-chart__skeleton-row"},{children:[i("span",{className:"ellm-pie-chart__skeleton-dot ellm-pie-chart__shimmer"}),i("span",{className:"ellm-pie-chart__skeleton-label ellm-pie-chart__shimmer"}),i("span",{className:"ellm-pie-chart__skeleton-value ellm-pie-chart__shimmer"})]}),a)})}))]}))}export{t as default};
|
|
2
|
+
//# sourceMappingURL=PieChartSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChartSkeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as l}from"../../../_virtual/_tslib.js";import{jsxs as a,jsx as e}from"react/jsx-runtime";function t(t){var i,o=t.ctx,r=t.config,c=t.valueFormatter,n=o.datum,s=o.value,d=o.color,m=o.percent,p=null!==(i=null==r?void 0:r.formatValue)&&void 0!==i?i:c,h=p?p(s,n):s;return a("div",l({className:"ellm-pie-chart__tooltip"},{children:[!1!==(null==r?void 0:r.showHeading)&&a("div",l({className:"ellm-pie-chart__tooltip-heading"},{children:[e("span",{className:"ellm-pie-chart__tooltip-swatch",style:{background:d}}),e("span",l({className:"ellm-pie-chart__tooltip-label"},{children:(null==r?void 0:r.formatHeading)?r.formatHeading(n.label):n.label}))]})),e("div",l({className:"ellm-pie-chart__tooltip-value"},{children:h})),!1!==(null==r?void 0:r.showShare)&&a("div",l({className:"ellm-pie-chart__tooltip-share"},{children:[m.toFixed(1),"% of total"]}))]}))}export{t as default};
|
|
2
|
+
//# sourceMappingURL=PieChartTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PieChartTooltip.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as r}from"../../../_virtual/_tslib.js";import{resolveBarColors as e}from"../BarChart/utils.js";export{darken,parseColor,withAlpha,withIntensity}from"../BarChart/utils.js";import{DEFAULT_PIE_COLOR as t}from"./types.js";var n=function(r){return"number"==typeof r&&Number.isFinite(r)&&r>0};function u(r,n,u,o){return void 0===n&&(n=t),void 0===u&&(u="rank"),void 0===o&&(o=[.18,1]),e(r,n,u,o)}function o(r){return r.reduce(function(r,e){return n(e.value)?r+e.value:r},0)}function i(r,e){return e>0?r/e*100:0}function l(e,t){var u=t.limit,o=t.othersLabel,i=void 0===o?"Others ({count} items)":o,l=t.othersColor,a=(null!=e?e:[]).filter(function(r){return n(r.value)});if(a.length<=u)return null!=e?e:[];var v=r([],a,!0).sort(function(r,e){return e.value-r.value}),c=v.slice(0,u),f=v.slice(u);return r(r([],c,!0),[{label:i.replace("{count}",String(f.length)),value:f.reduce(function(r,e){return r+e.value},0),color:l,meta:{grouped:f}}],!1)}function a(r,e){if(!(null==r?void 0:r.length))return[];var t=e.labelKey,n=e.valueKey,u=e.colorKey;return r.map(function(r){var e,o=r[n],i="string"==typeof o?Number(o):o;return{label:String(null!==(e=r[t])&&void 0!==e?e:""),value:"number"==typeof i&&Number.isFinite(i)?i:null,color:u?r[u]:void 0,meta:r}})}export{l as groupTopSlices,n as isPlottableSlice,i as percentOf,u as resolveSliceColors,o as sumSlices,a as toPieChartData};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as l}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o}from"react";import{ArrowRight as a,Minimize as n,Maximize as i}from"lucide-react";import c from"./FTable.js";import r from"../FiltersSidebar/CustomTextInput.js";import d from"./SortDropdown.js";function s(s){var u=s.title,h=s.icon,v=s.showExpandButton,m=void 0===v||v,p=s.className,f=s.styles,x=s.table,N=s.searchBar,b=s.sort,y=s.cta,g=s.onExpand,C=o(!1),j=C[0],B=C[1],k=Boolean((null==y?void 0:y.ctaEnabled)&&(null==y?void 0:y.ctaText));return e("div",l({className:"\n tc-root\n ".concat(j?"tc-root--fullscreen":"","\n ").concat(null!=p?p:"","\n "),style:null==f?void 0:f.root},{children:[e("div",l({className:"tc-header",style:null==f?void 0:f.header},{children:[e("div",l({className:"tc-header-left"},{children:[h&&t("div",l({className:"tc-title-icon",style:l({width:"20px",height:"20px"},null==f?void 0:f.icon)},{children:h})),t("div",l({className:"tc-title",style:null==f?void 0:f.title},{children:u}))]})),e("div",l({className:"tc-header-right"},{children:[N&&t(r,{value:null==N?void 0:N.value,placeholder:null==N?void 0:N.placeholder,onChange:null==N?void 0:N.onChange,searchIcon:!0,className:"tc-search"}),b&&t(d,{value:b.value,orderBy:b.orderBy,options:b.options,placeholder:null==b?void 0:b.placeholder,onChange:b.onChange}),k&&e("button",l({type:"button",className:"tc-cta",onClick:function(){var l;return null===(l=null==y?void 0:y.ctaOnClick)||void 0===l?void 0:l.call(y)}},{children:[null==y?void 0:y.ctaText,t(a,{size:14,strokeWidth:2,"aria-hidden":!0})]})),m&&!k&&t("button",l({className:"tc-expand-btn",onClick:function(){var l=!j;B(l),null==g||g(l)}},{children:t(j?n:i,{size:20})}))]}))]})),t("div",l({className:"tc-table"},{children:t(c,l({},x,{emptyState:null==x?void 0:x.emptyState,scrollHeight:j?"calc(100vh - 140px)":null==x?void 0:x.scrollHeight}))}))]}))}export{s as default};
|
|
2
2
|
//# sourceMappingURL=TableCard.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as l,jsx as r}from"react/jsx-runtime";import{useMemo as t}from"react";import{Search as a,ListFilter as i,Plus as n}from"lucide-react";import s from"../Table/FTable.js";function o(o){var c,u=o.subtitle,d=o.search,m=o.filter,p=o.addAction,h=o.table,v=o.styles,b=o.children,f=t(function(){if(!(null==d?void 0:d.value)||!(null==d?void 0:d.searchKey)||!h.rows)return h.rows;var e=d.value.toLowerCase(),l=Array.isArray(d.searchKey)?d.searchKey:[d.searchKey];return h.rows.filter(function(r){return l.some(function(l){var t=r[l];return t&&String(t).toLowerCase().includes(e)})})},[h.rows,null==d?void 0:d.value,null==d?void 0:d.searchKey]);return l("div",e({className:"tp-main",style:null==v?void 0:v.root},{children:[l("div",e({className:"tp-toolbar",style:null==v?void 0:v.toolbar},{children:[r("div",e({className:"tp-subtitle"},{children:u})),l("div",e({className:"tp-actions"},{children:[d&&l("div",e({className:"tp-search"},{children:[r(a,{size:16,className:"tp-search-icon"}),r("input",{type:"text",placeholder:d.placeholder||"Search...",className:"tp-search-input",value:d.value,onChange:function(e){return d.onChange(e.target.value)}})]})),m&&l("button",e({className:"tp-filter-btn",onClick:m.onClick},{children:[r(i,{size:16}),"Filter",(null!==(c=m.count)&&void 0!==c?c:0)>0&&r("span",e({className:"tp-filter-badge"},{children:m.count}))]})),p&&l("button",e({className:"tp-add-btn",onClick:p.onClick},{children:[p.icon||r(n,{size:16}),p.label]}))]}))]})),r("div",e({className:"tp-table-wrapper",style:null==v?void 0:v.tableWrapper},{children:r(s,e({},h,{rows:f,columns:h.columns||h.extraColumns}))})),b]}))}export{o as default};
|
|
2
|
+
//# sourceMappingURL=TablePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePage.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|