@e-llm-studio/federated-dashboard-components 0.0.1-alpha.0
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/README.md +698 -0
- package/dist/ExecutiveDashboardWrapper.js +2 -0
- package/dist/ExecutiveDashboardWrapper.js.map +1 -0
- package/dist/_virtual/_tslib.js +2 -0
- package/dist/_virtual/_tslib.js.map +1 -0
- package/dist/api/dashboardApi.js +2 -0
- package/dist/api/dashboardApi.js.map +1 -0
- package/dist/cjs/ExecutiveDashboardWrapper.js +2 -0
- package/dist/cjs/ExecutiveDashboardWrapper.js.map +1 -0
- package/dist/cjs/_virtual/_tslib.js +2 -0
- package/dist/cjs/_virtual/_tslib.js.map +1 -0
- package/dist/cjs/api/dashboardApi.js +2 -0
- package/dist/cjs/api/dashboardApi.js.map +1 -0
- package/dist/cjs/components/DashboardCard/BreakingNewsBanner.js +2 -0
- package/dist/cjs/components/DashboardCard/BreakingNewsBanner.js.map +1 -0
- package/dist/cjs/components/DashboardCard/CardShell.js +2 -0
- package/dist/cjs/components/DashboardCard/CardShell.js.map +1 -0
- package/dist/cjs/components/DashboardCard/CenteredCell.js +2 -0
- package/dist/cjs/components/DashboardCard/CenteredCell.js.map +1 -0
- package/dist/cjs/components/DashboardCard/DashboardCard.js +2 -0
- package/dist/cjs/components/DashboardCard/DashboardCard.js.map +1 -0
- package/dist/cjs/components/DashboardCard/DetailRow.js +2 -0
- package/dist/cjs/components/DashboardCard/DetailRow.js.map +1 -0
- package/dist/cjs/components/DashboardCard/EventsSection.js +2 -0
- package/dist/cjs/components/DashboardCard/EventsSection.js.map +1 -0
- package/dist/cjs/components/DashboardCard/FooterLinkButton.js +2 -0
- package/dist/cjs/components/DashboardCard/FooterLinkButton.js.map +1 -0
- package/dist/cjs/components/DashboardCard/GridSection.js +2 -0
- package/dist/cjs/components/DashboardCard/GridSection.js.map +1 -0
- package/dist/cjs/components/DashboardCard/ListSection.js +2 -0
- package/dist/cjs/components/DashboardCard/ListSection.js.map +1 -0
- package/dist/cjs/components/DashboardCard/SectionHeadingBar.js +2 -0
- package/dist/cjs/components/DashboardCard/SectionHeadingBar.js.map +1 -0
- package/dist/cjs/components/DashboardCard/SkeletonRow.js +2 -0
- package/dist/cjs/components/DashboardCard/SkeletonRow.js.map +1 -0
- package/dist/cjs/components/DashboardCard/TagsSection.js +2 -0
- package/dist/cjs/components/DashboardCard/TagsSection.js.map +1 -0
- package/dist/cjs/components/DashboardCard/TopDropdownMenu.js +2 -0
- package/dist/cjs/components/DashboardCard/TopDropdownMenu.js.map +1 -0
- package/dist/cjs/components/DashboardCard/sectionContent.js +2 -0
- package/dist/cjs/components/DashboardCard/sectionContent.js.map +1 -0
- package/dist/cjs/components/DashboardCard/styles/DashboardCardStyles.js +2 -0
- package/dist/cjs/components/DashboardCard/styles/DashboardCardStyles.js.map +1 -0
- package/dist/cjs/components/DashboardDateFilter/DashboardDateFilter.js +2 -0
- package/dist/cjs/components/DashboardDateFilter/DashboardDateFilter.js.map +1 -0
- package/dist/cjs/components/DashboardDateFilter/datePreset.js +2 -0
- package/dist/cjs/components/DashboardDateFilter/datePreset.js.map +1 -0
- package/dist/cjs/components/DashboardSkeleton/DashboardSkeleton.js +2 -0
- package/dist/cjs/components/DashboardSkeleton/DashboardSkeleton.js.map +1 -0
- package/dist/cjs/components/DatePickers/DatePicker.js +2 -0
- package/dist/cjs/components/DatePickers/DatePicker.js.map +1 -0
- package/dist/cjs/components/DatePickers/DateRangeSelector.js +2 -0
- package/dist/cjs/components/DatePickers/DateRangeSelector.js.map +1 -0
- package/dist/cjs/components/DatePickers/DateSelector.js +2 -0
- package/dist/cjs/components/DatePickers/DateSelector.js.map +1 -0
- package/dist/cjs/components/DropDowns/CustomMultiSelect.js +2 -0
- package/dist/cjs/components/DropDowns/CustomMultiSelect.js.map +1 -0
- package/dist/cjs/components/DropDowns/CustomSingleSelect.js +2 -0
- package/dist/cjs/components/DropDowns/CustomSingleSelect.js.map +1 -0
- package/dist/cjs/components/ExecutiveDashboard.js +2 -0
- package/dist/cjs/components/ExecutiveDashboard.js.map +1 -0
- package/dist/cjs/components/FiltersSidebar/CustomTextInput.js +2 -0
- package/dist/cjs/components/FiltersSidebar/CustomTextInput.js.map +1 -0
- package/dist/cjs/components/FiltersSidebar/FiltersSidebar.js +2 -0
- package/dist/cjs/components/FiltersSidebar/FiltersSidebar.js.map +1 -0
- package/dist/cjs/components/Graph/Graph.js +2 -0
- package/dist/cjs/components/Graph/Graph.js.map +1 -0
- package/dist/cjs/components/Graph/GraphEmptyState.js +2 -0
- package/dist/cjs/components/Graph/GraphEmptyState.js.map +1 -0
- package/dist/cjs/components/Graph/GraphSkeleton.js +2 -0
- package/dist/cjs/components/Graph/GraphSkeleton.js.map +1 -0
- package/dist/cjs/components/Graph/LineChart.js +2 -0
- package/dist/cjs/components/Graph/LineChart.js.map +1 -0
- package/dist/cjs/components/Graph/PlotBySelector.js +2 -0
- package/dist/cjs/components/Graph/PlotBySelector.js.map +1 -0
- package/dist/cjs/components/Graph/types.js +2 -0
- package/dist/cjs/components/Graph/types.js.map +1 -0
- package/dist/cjs/components/MetricCard/MetricCard.js +2 -0
- package/dist/cjs/components/MetricCard/MetricCard.js.map +1 -0
- package/dist/cjs/components/Table/FTable.js +2 -0
- package/dist/cjs/components/Table/FTable.js.map +1 -0
- package/dist/cjs/components/Table/SortDropdown.js +2 -0
- package/dist/cjs/components/Table/SortDropdown.js.map +1 -0
- package/dist/cjs/components/Table/TableCard.js +2 -0
- package/dist/cjs/components/Table/TableCard.js.map +1 -0
- package/dist/cjs/components/Table/TableGrid/TableGrid.js +2 -0
- package/dist/cjs/components/Table/TableGrid/TableGrid.js.map +1 -0
- package/dist/cjs/components/Table/TableGrid/TableLayoutToggle.js +2 -0
- package/dist/cjs/components/Table/TableGrid/TableLayoutToggle.js.map +1 -0
- package/dist/cjs/components/Table/TableGrid/spans.js +2 -0
- package/dist/cjs/components/Table/TableGrid/spans.js.map +1 -0
- package/dist/cjs/components/Table/TableGrid/useResponsiveColumns.js +2 -0
- package/dist/cjs/components/Table/TableGrid/useResponsiveColumns.js.map +1 -0
- package/dist/cjs/components/ui/chart.js +2 -0
- package/dist/cjs/components/ui/chart.js.map +1 -0
- package/dist/cjs/components/ui/utils.js +2 -0
- package/dist/cjs/components/ui/utils.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/styles.css +1 -0
- package/dist/cjs/utils/index.js +2 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/kpiIcon.js +2 -0
- package/dist/cjs/utils/kpiIcon.js.map +1 -0
- package/dist/cjs/utils/sectionOrder.js +2 -0
- package/dist/cjs/utils/sectionOrder.js.map +1 -0
- package/dist/cjs/utils/tableColumns.js +2 -0
- package/dist/cjs/utils/tableColumns.js.map +1 -0
- package/dist/components/DashboardCard/BreakingNewsBanner.js +2 -0
- package/dist/components/DashboardCard/BreakingNewsBanner.js.map +1 -0
- package/dist/components/DashboardCard/CardShell.js +2 -0
- package/dist/components/DashboardCard/CardShell.js.map +1 -0
- package/dist/components/DashboardCard/CenteredCell.js +2 -0
- package/dist/components/DashboardCard/CenteredCell.js.map +1 -0
- package/dist/components/DashboardCard/DashboardCard.js +2 -0
- package/dist/components/DashboardCard/DashboardCard.js.map +1 -0
- package/dist/components/DashboardCard/DetailRow.js +2 -0
- package/dist/components/DashboardCard/DetailRow.js.map +1 -0
- package/dist/components/DashboardCard/EventsSection.js +2 -0
- package/dist/components/DashboardCard/EventsSection.js.map +1 -0
- package/dist/components/DashboardCard/FooterLinkButton.js +2 -0
- package/dist/components/DashboardCard/FooterLinkButton.js.map +1 -0
- package/dist/components/DashboardCard/GridSection.js +2 -0
- package/dist/components/DashboardCard/GridSection.js.map +1 -0
- package/dist/components/DashboardCard/ListSection.js +2 -0
- package/dist/components/DashboardCard/ListSection.js.map +1 -0
- package/dist/components/DashboardCard/SectionHeadingBar.js +2 -0
- package/dist/components/DashboardCard/SectionHeadingBar.js.map +1 -0
- package/dist/components/DashboardCard/SkeletonRow.js +2 -0
- package/dist/components/DashboardCard/SkeletonRow.js.map +1 -0
- package/dist/components/DashboardCard/TagsSection.js +2 -0
- package/dist/components/DashboardCard/TagsSection.js.map +1 -0
- package/dist/components/DashboardCard/TopDropdownMenu.js +2 -0
- package/dist/components/DashboardCard/TopDropdownMenu.js.map +1 -0
- package/dist/components/DashboardCard/sectionContent.js +2 -0
- package/dist/components/DashboardCard/sectionContent.js.map +1 -0
- package/dist/components/DashboardCard/styles/DashboardCardStyles.js +2 -0
- package/dist/components/DashboardCard/styles/DashboardCardStyles.js.map +1 -0
- package/dist/components/DashboardDateFilter/DashboardDateFilter.js +2 -0
- package/dist/components/DashboardDateFilter/DashboardDateFilter.js.map +1 -0
- package/dist/components/DashboardDateFilter/datePreset.js +2 -0
- package/dist/components/DashboardDateFilter/datePreset.js.map +1 -0
- package/dist/components/DashboardSkeleton/DashboardSkeleton.js +2 -0
- package/dist/components/DashboardSkeleton/DashboardSkeleton.js.map +1 -0
- package/dist/components/DatePickers/DatePicker.js +2 -0
- package/dist/components/DatePickers/DatePicker.js.map +1 -0
- package/dist/components/DatePickers/DateRangeSelector.js +2 -0
- package/dist/components/DatePickers/DateRangeSelector.js.map +1 -0
- package/dist/components/DatePickers/DateSelector.js +2 -0
- package/dist/components/DatePickers/DateSelector.js.map +1 -0
- package/dist/components/DropDowns/CustomMultiSelect.js +2 -0
- package/dist/components/DropDowns/CustomMultiSelect.js.map +1 -0
- package/dist/components/DropDowns/CustomSingleSelect.js +2 -0
- package/dist/components/DropDowns/CustomSingleSelect.js.map +1 -0
- package/dist/components/ExecutiveDashboard.js +2 -0
- package/dist/components/ExecutiveDashboard.js.map +1 -0
- package/dist/components/FiltersSidebar/CustomTextInput.js +2 -0
- package/dist/components/FiltersSidebar/CustomTextInput.js.map +1 -0
- package/dist/components/FiltersSidebar/FiltersSidebar.js +2 -0
- package/dist/components/FiltersSidebar/FiltersSidebar.js.map +1 -0
- package/dist/components/Graph/Graph.js +2 -0
- package/dist/components/Graph/Graph.js.map +1 -0
- package/dist/components/Graph/GraphEmptyState.js +2 -0
- package/dist/components/Graph/GraphEmptyState.js.map +1 -0
- package/dist/components/Graph/GraphSkeleton.js +2 -0
- package/dist/components/Graph/GraphSkeleton.js.map +1 -0
- package/dist/components/Graph/LineChart.js +2 -0
- package/dist/components/Graph/LineChart.js.map +1 -0
- package/dist/components/Graph/PlotBySelector.js +2 -0
- package/dist/components/Graph/PlotBySelector.js.map +1 -0
- package/dist/components/Graph/types.js +2 -0
- package/dist/components/Graph/types.js.map +1 -0
- package/dist/components/MetricCard/MetricCard.js +2 -0
- package/dist/components/MetricCard/MetricCard.js.map +1 -0
- package/dist/components/Table/FTable.js +2 -0
- package/dist/components/Table/FTable.js.map +1 -0
- package/dist/components/Table/SortDropdown.js +2 -0
- package/dist/components/Table/SortDropdown.js.map +1 -0
- package/dist/components/Table/TableCard.js +2 -0
- package/dist/components/Table/TableCard.js.map +1 -0
- package/dist/components/Table/TableGrid/TableGrid.js +2 -0
- package/dist/components/Table/TableGrid/TableGrid.js.map +1 -0
- package/dist/components/Table/TableGrid/TableLayoutToggle.js +2 -0
- package/dist/components/Table/TableGrid/TableLayoutToggle.js.map +1 -0
- package/dist/components/Table/TableGrid/spans.js +2 -0
- package/dist/components/Table/TableGrid/spans.js.map +1 -0
- package/dist/components/Table/TableGrid/useResponsiveColumns.js +2 -0
- package/dist/components/Table/TableGrid/useResponsiveColumns.js.map +1 -0
- package/dist/components/ui/chart.js +2 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/utils.js +2 -0
- package/dist/components/ui/utils.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/types/App.d.ts +2 -0
- package/dist/types/App.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboardWrapper.d.ts +4 -0
- package/dist/types/ExecutiveDashboardWrapper.d.ts.map +1 -0
- package/dist/types/api/dashboardApi.d.ts +30 -0
- package/dist/types/api/dashboardApi.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/BreakingNewsBanner.d.ts +9 -0
- package/dist/types/components/DashboardCard/BreakingNewsBanner.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/CardShell.d.ts +22 -0
- package/dist/types/components/DashboardCard/CardShell.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/CenteredCell.d.ts +6 -0
- package/dist/types/components/DashboardCard/CenteredCell.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/DashboardCard.d.ts +5 -0
- package/dist/types/components/DashboardCard/DashboardCard.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/DetailRow.d.ts +9 -0
- package/dist/types/components/DashboardCard/DetailRow.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/EventsSection.d.ts +3 -0
- package/dist/types/components/DashboardCard/EventsSection.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/FooterLinkButton.d.ts +6 -0
- package/dist/types/components/DashboardCard/FooterLinkButton.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/GridSection.d.ts +3 -0
- package/dist/types/components/DashboardCard/GridSection.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/ListSection.d.ts +4 -0
- package/dist/types/components/DashboardCard/ListSection.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/SectionHeadingBar.d.ts +9 -0
- package/dist/types/components/DashboardCard/SectionHeadingBar.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/SkeletonRow.d.ts +3 -0
- package/dist/types/components/DashboardCard/SkeletonRow.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/TagsSection.d.ts +3 -0
- package/dist/types/components/DashboardCard/TagsSection.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/TopDropdownMenu.d.ts +6 -0
- package/dist/types/components/DashboardCard/TopDropdownMenu.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/sectionContent.d.ts +4 -0
- package/dist/types/components/DashboardCard/sectionContent.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/styles/DashboardCardStyles.d.ts +17 -0
- package/dist/types/components/DashboardCard/styles/DashboardCardStyles.d.ts.map +1 -0
- package/dist/types/components/DashboardCard/types.d.ts +156 -0
- package/dist/types/components/DashboardCard/types.d.ts.map +1 -0
- package/dist/types/components/DashboardDateFilter/DashboardDateFilter.d.ts +41 -0
- package/dist/types/components/DashboardDateFilter/DashboardDateFilter.d.ts.map +1 -0
- package/dist/types/components/DashboardDateFilter/DashboardDateFilter.types.d.ts +18 -0
- package/dist/types/components/DashboardDateFilter/DashboardDateFilter.types.d.ts.map +1 -0
- package/dist/types/components/DashboardDateFilter/datePreset.d.ts +90 -0
- package/dist/types/components/DashboardDateFilter/datePreset.d.ts.map +1 -0
- package/dist/types/components/DashboardSkeleton/DashboardSkeleton.d.ts +4 -0
- package/dist/types/components/DashboardSkeleton/DashboardSkeleton.d.ts.map +1 -0
- package/dist/types/components/DatePickers/DatePicker.d.ts +10 -0
- package/dist/types/components/DatePickers/DatePicker.d.ts.map +1 -0
- package/dist/types/components/DatePickers/DateRangeSelector.d.ts +20 -0
- package/dist/types/components/DatePickers/DateRangeSelector.d.ts.map +1 -0
- package/dist/types/components/DatePickers/DateSelector.d.ts +19 -0
- package/dist/types/components/DatePickers/DateSelector.d.ts.map +1 -0
- package/dist/types/components/DropDowns/CustomMultiSelect.d.ts +17 -0
- package/dist/types/components/DropDowns/CustomMultiSelect.d.ts.map +1 -0
- package/dist/types/components/DropDowns/CustomSingleSelect.d.ts +16 -0
- package/dist/types/components/DropDowns/CustomSingleSelect.d.ts.map +1 -0
- package/dist/types/components/ExecutiveDashboard.d.ts +56 -0
- package/dist/types/components/ExecutiveDashboard.d.ts.map +1 -0
- package/dist/types/components/FiltersSidebar/CustomTextInput.d.ts +12 -0
- package/dist/types/components/FiltersSidebar/CustomTextInput.d.ts.map +1 -0
- package/dist/types/components/FiltersSidebar/FiltersSidebar.d.ts +34 -0
- package/dist/types/components/FiltersSidebar/FiltersSidebar.d.ts.map +1 -0
- package/dist/types/components/Graph/Graph.d.ts +4 -0
- package/dist/types/components/Graph/Graph.d.ts.map +1 -0
- package/dist/types/components/Graph/GraphEmptyState.d.ts +11 -0
- package/dist/types/components/Graph/GraphEmptyState.d.ts.map +1 -0
- package/dist/types/components/Graph/GraphSkeleton.d.ts +10 -0
- package/dist/types/components/Graph/GraphSkeleton.d.ts.map +1 -0
- package/dist/types/components/Graph/LineChart.d.ts +25 -0
- package/dist/types/components/Graph/LineChart.d.ts.map +1 -0
- package/dist/types/components/Graph/PlotBySelector.d.ts +17 -0
- package/dist/types/components/Graph/PlotBySelector.d.ts.map +1 -0
- package/dist/types/components/Graph/types.d.ts +217 -0
- package/dist/types/components/Graph/types.d.ts.map +1 -0
- package/dist/types/components/MetricCard/MetricCard.d.ts +49 -0
- package/dist/types/components/MetricCard/MetricCard.d.ts.map +1 -0
- package/dist/types/components/Table/FTable.d.ts +49 -0
- package/dist/types/components/Table/FTable.d.ts.map +1 -0
- package/dist/types/components/Table/SortDropdown.d.ts +13 -0
- package/dist/types/components/Table/SortDropdown.d.ts.map +1 -0
- package/dist/types/components/Table/TableCard.d.ts +35 -0
- package/dist/types/components/Table/TableCard.d.ts.map +1 -0
- package/dist/types/components/Table/TableGrid/TableGrid.d.ts +54 -0
- package/dist/types/components/Table/TableGrid/TableGrid.d.ts.map +1 -0
- package/dist/types/components/Table/TableGrid/TableLayoutToggle.d.ts +20 -0
- package/dist/types/components/Table/TableGrid/TableLayoutToggle.d.ts.map +1 -0
- package/dist/types/components/Table/TableGrid/spans.d.ts +15 -0
- package/dist/types/components/Table/TableGrid/spans.d.ts.map +1 -0
- package/dist/types/components/Table/TableGrid/useResponsiveColumns.d.ts +17 -0
- package/dist/types/components/Table/TableGrid/useResponsiveColumns.d.ts.map +1 -0
- package/dist/types/components/ui/chart.d.ts +72 -0
- package/dist/types/components/ui/chart.d.ts.map +1 -0
- package/dist/types/components/ui/utils.d.ts +7 -0
- package/dist/types/components/ui/utils.d.ts.map +1 -0
- package/dist/types/constant/index.d.ts +5 -0
- package/dist/types/constant/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +357 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +65 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/kpiIcon.d.ts +4 -0
- package/dist/types/utils/kpiIcon.d.ts.map +1 -0
- package/dist/types/utils/sectionOrder.d.ts +43 -0
- package/dist/types/utils/sectionOrder.d.ts.map +1 -0
- package/dist/types/utils/tableColumns.d.ts +16 -0
- package/dist/types/utils/tableColumns.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/kpiIcon.js +2 -0
- package/dist/utils/kpiIcon.js.map +1 -0
- package/dist/utils/sectionOrder.js +2 -0
- package/dist/utils/sectionOrder.js.map +1 -0
- package/dist/utils/tableColumns.js +2 -0
- package/dist/utils/tableColumns.js.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as e,__rest as r,__assign as t,__generator 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,r,t,a,o,i,l,u,d,s,c,v,f,h;return n(this,function(n){switch(n.label){case 0:W(!0),re(null),null===(l=De.current)||void 0===l||l.abort(),e=new AbortController,De.current=e,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,P({configId:w,baseUrl:S},e.signal)];case 2:return r=n.sent(),B(r),t={},null===(s=null===(d=null===(u=null==r?void 0:r.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&&(t[e.key]=e.plotOptions[0].value)}),le(t),a={},null===(v=null===(c=null==r?void 0:r.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==r?void 0:r.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=n.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,r,t,a,o;return n(this,function(n){switch(n.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),n.label=1;case 1:return n.trys.push([1,3,4,5]),r={startDate:he.start,endDate:he.end,filters:ve},[4,N({configId:w,baseUrl:S},r,e.signal)];case 2:return t=n.sent(),G(t),Fe({}),[3,5];case 3:return"AbortError"===(null==(a=n.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(r,o){return e(y,void 0,void 0,function(){var e,i,l,u,d,s,c;return n(this,function(n){switch(n.label){case 0:if(!he||!Se.current.has(r)||Ee.current[r])return[2];e=new AbortController,Ee.current[r]=e,i=function(){return!Se.current.has(r)||e.signal.aborted||Ee.current[r]!==e},Fe(function(e){var n,a,o,i,l,u,d,s;return t(t({},e),((n={})[r]={rows:null!==(o=null===(a=e[r])||void 0===a?void 0:a.rows)&&void 0!==o?o:[],cursor:null===(i=e[r])||void 0===i?void 0:i.cursor,hasMore:null!==(u=null===(l=e[r])||void 0===l?void 0:l.hasMore)&&void 0!==u&&u,loading:!0,loaded:null!==(s=null===(d=e[r])||void 0===d?void 0:d.loaded)&&void 0!==s&&s},n))}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,V({configId:w,baseUrl:S},t({startDate:he.start,endDate:he.end,filters:ve,tableKey:r,pageSize:20},o?{cursor:o}:{}),e.signal)];case 2:return l=n.sent(),u=null!==(c=null===(s=l.table)||void 0===s?void 0:s[r])&&void 0!==c?c:[],i()?[2]:(Fe(function(e){var n,o,i=e[r];return i?t(t({},e),((n={})[r]={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},n)):e}),[3,5]);case 3:return"AbortError"===(null==(d=n.sent())?void 0:d.name)||i()?[2]:(Fe(function(e){var n;return e[r]?t(t({},e),((n={})[r]=t(t({},e[r]),{loading:!1,hasMore:!1}),n)):e}),[3,5]);case 4:return Ee.current[r]===e&&delete Ee.current[r],[7];case 5:return[2]}})})},[w,S,he,ve,V]),Re=c(function(e,t){var n;if(!t)return Se.current.delete(e),null===(n=Ee.current[e])||void 0===n||n.abort(),delete Ee.current[e],void Fe(function(t){var n=t,a=e;return n[a],r(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",t({style:{padding:24,color:"#b91c1c"}},{children:["Failed to load dashboard: ",ee.message,o("button",t({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(n){var a;return t(t({},n),((a={})[e]=r,a))})},sidebarVisible:ne,onSidebarShow:function(){return ae(!0)},onSidebarHide:function(){return ae(!1)},filterValues:de,onFilterChange:function(e,r){se(function(n){var a;return t(t({},n),((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};
|
|
2
|
+
//# sourceMappingURL=ExecutiveDashboardWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutiveDashboardWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},t(r,e)};function r(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var e=function(){return e=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},e.apply(this,arguments)};function n(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(e[n[o]]=t[n[o]])}return e}function o(t,r,e,n){return new(e||(e=Promise))(function(o,c){function a(t){try{u(n.next(t))}catch(t){c(t)}}function l(t){try{u(n.throw(t))}catch(t){c(t)}}function u(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e(function(t){t(r)})).then(a,l)}u((n=n.apply(t,r||[])).next())})}function c(t,r){var e,n,o,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(u){return function(l){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(c=0)),c;)try{if(e=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,n=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){c=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){c.label=l[1];break}if(6===l[0]&&c.label<o[1]){c.label=o[1],o=l;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(l);break}o[2]&&c.ops.pop(),c.trys.pop();continue}l=r.call(t,c)}catch(t){l=[6,t],n=0}finally{e=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}function a(t,r,e){if(e||2===arguments.length)for(var n,o=0,c=r.length;o<c;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;export{e as __assign,o as __awaiter,r as __extends,c as __generator,n as __rest,a as __spreadArray};
|
|
2
|
+
//# sourceMappingURL=_tslib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__extends as t,__awaiter as r,__generator as e,__assign as i}from"../_virtual/_tslib.js";var n=function(r){function e(t,e){var i=r.call(this,t)||this;return i.name="DashboardApiError",i.status=e,i}return t(e,r),e}(Error),a=function(t){return t.replace(/\/+$/,"")};function s(t,i,a){var s;return r(this,void 0,void 0,function(){var r,o;return e(this,function(e){switch(e.label){case 0:return[4,fetch(t,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i),signal:a})];case 1:if(!(r=e.sent()).ok)throw new n("Request failed with status ".concat(r.status),r.status);return[4,r.json()];case 2:if(!(o=e.sent()).success)throw new n((null===(s=o.error)||void 0===s?void 0:s.errorMessage)||"Request failed");return[2,o.data]}})})}function o(t,i){var n=t.configId,o=t.baseUrl,c=void 0===o?"":o;return r(this,void 0,void 0,function(){return e(this,function(t){return[2,s("".concat(a(c),"/federated/filters/ui"),{config_id:n},i)]})})}function c(t,i){var n=t.configId,o=t.baseUrl,c=void 0===o?"":o;return r(this,void 0,void 0,function(){var t;return e(this,function(r){switch(r.label){case 0:return[4,s("".concat(a(c),"/federated/filters/distinct-value"),{config_id:n},i)];case 1:return[2,(null==(t=r.sent())?void 0:t.sidebarFilters)||{}]}})})}function u(t,n){return r(this,void 0,void 0,function(){var r,a,s;return e(this,function(e){switch(e.label){case 0:return[4,Promise.all([o(t,n),c(t,n)])];case 1:return r=e.sent(),a=r[0],s=r[1],[2,{data:i(i({},a),{sidebarFilters:(a.sidebarFilters||[]).map(function(t){return i(i({},t),{options:s[t.schemaFilterName]||[]})})})}]}})})}function d(t){void 0===t&&(t={});var r={};return Object.entries(t).forEach(function(t){var e=t[0],i=t[1];Array.isArray(i)?i.length>0&&(r[e]=i):""!==i&&null!=i&&(r[e]=[i])}),r}function f(t,i,n){var o=t.configId,c=t.baseUrl,u=void 0===c?"":c;return r(this,void 0,void 0,function(){var t;return e(this,function(r){return t={config_id:o,dateFilters:{startDate:i.startDate?i.startDate.toISOString():"",endDate:i.endDate?i.endDate.toISOString():""},sidebarFilters:d(i.filters)},[2,s("".concat(a(u),"/federated/filters/get-data"),t,n)]})})}function l(t,n,o){var c,u=t.configId,f=t.baseUrl,l=void 0===f?"":f;return r(this,void 0,void 0,function(){return e(this,function(t){return[2,s("".concat(a(l),"/federated/filters/table-data"),i({config_id:u,dateFilters:{startDate:n.startDate?n.startDate.toISOString():"",endDate:n.endDate?n.endDate.toISOString():""},sidebarFilters:d(n.filters),tableKey:n.tableKey,pageSize:null!==(c=n.pageSize)&&void 0!==c?c:20},n.cursor?{cursor:n.cursor}:{}),o)]})})}export{n as DashboardApiError,f as fetchDashboardData,l as fetchTableData,u as fetchUIConfig};
|
|
2
|
+
//# sourceMappingURL=dashboardApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboardApi.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),n=require("./components/ExecutiveDashboard.js"),a=require("./components/DashboardDateFilter/datePreset.js"),u=require("./components/DashboardSkeleton/DashboardSkeleton.js"),i=require("./api/dashboardApi.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(r);function l(o){var l=this,d=o.baseUrl,c=void 0===d?"https://dev.appmod.ai":d,f=o.configId,v=o.graphEmptyState,b=o.tables,g=o.tableLayout,h=o.sectionOrder,_=o.hiddenSections,p=o.fetchUIConfig,D=o.fetchDashboardData,S=o.fetchTableData,m=o.initialStartDate,y=o.initialEndDate,E=o.onDateChange,C=o.onFiltersApplied,j=o.renderLoading,x=o.renderError,w=null!=p?p:i.fetchUIConfig,F=null!=D?D:i.fetchDashboardData,A=null!=S?S:i.fetchTableData,R=r.useState(null),k=R[0],T=R[1],M=r.useState(null),q=M[0],O=M[1],I=r.useState(!0),L=I[0],U=I[1],P=r.useState(!0),K=P[0],N=P[1],V=r.useState(null),z=V[0],B=V[1],H=r.useState(!1),W=H[0],G=H[1],J=r.useState({}),Q=J[0],X=J[1],Y=r.useState({}),Z=Y[0],$=Y[1],ee=r.useState({}),te=ee[0],re=ee[1],ne=r.useState(null),ae=ne[0],ue=ne[1],ie=s.default.useRef(null),oe=s.default.useRef(!1),se=r.useRef(null),le=r.useRef(null),de=r.useRef({}),ce=r.useRef(new Set),fe=r.useState({}),ve=fe[0],be=fe[1],ge=r.useCallback(function(){return e.__awaiter(l,void 0,void 0,function(){var t,r,n,u,i,o,s,l,d,v,b,g,h,_;return e.__generator(this,function(e){switch(e.label){case 0:U(!0),B(null),null===(s=se.current)||void 0===s||s.abort(),t=new AbortController,se.current=t,e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,w({configId:f,baseUrl:c},t.signal)];case 2:return r=e.sent(),T(r),n={},null===(v=null===(d=null===(l=null==r?void 0:r.data)||void 0===l?void 0:l.graphBuilder)||void 0===d?void 0:d.tiers)||void 0===v||v.forEach(function(e){e.plotOptions.length>0&&(n[e.key]=e.plotOptions[0].value)}),X(n),u={},null===(g=null===(b=null==r?void 0:r.data)||void 0===b?void 0:b.sidebarFilters)||void 0===g||g.forEach(function(e){u[e.schemaFilterName]="Multi select"===e.type?[]:""}),$(u),re(u),oe.current||(i=m&&y?{startDate:m,endDate:y}:(p=null===(_=null===(h=null==r?void 0:r.data)||void 0===h?void 0:h.dateFilters)||void 0===_?void 0:_.defaultPreset,(D=Object.values(a.DATE_PRESETS).find(function(e){return e.value===p}))&&"getRange"in D?D.getRange():null))&&(oe.current=!0,ie.current={start:i.startDate.getTime(),end:i.endDate.getTime()},ue({start:i.startDate,end:i.endDate})),[3,5];case 3:return"AbortError"===(null==(o=e.sent())?void 0:o.name)?[2]:(B(o),[3,5]);case 4:return se.current===t&&U(!1),[7];case 5:return[2]}var p,D})})},[f,c,w,m,y]);r.useEffect(function(){return ge(),function(){var e;return null===(e=se.current)||void 0===e?void 0:e.abort()}},[ge]);var he=r.useCallback(function(){return e.__awaiter(l,void 0,void 0,function(){var t,r,n,a,u;return e.__generator(this,function(e){switch(e.label){case 0:if(!ae)return[2];null===(u=le.current)||void 0===u||u.abort(),t=new AbortController,le.current=t,N(!0),B(null),e.label=1;case 1:return e.trys.push([1,3,4,5]),r={startDate:ae.start,endDate:ae.end,filters:te},[4,F({configId:f,baseUrl:c},r,t.signal)];case 2:return n=e.sent(),O(n),be({}),[3,5];case 3:return"AbortError"===(null==(a=e.sent())?void 0:a.name)?[2]:(B(a),[3,5]);case 4:return le.current===t&&N(!1),[7];case 5:return[2]}})})},[f,c,ae,te,F]),_e=r.useCallback(function(t,r){return e.__awaiter(l,void 0,void 0,function(){var n,a,u,i,o,s,l;return e.__generator(this,function(d){switch(d.label){case 0:if(!ae||!ce.current.has(t)||de.current[t])return[2];n=new AbortController,de.current[t]=n,a=function(){return!ce.current.has(t)||n.signal.aborted||de.current[t]!==n},be(function(r){var n,a,u,i,o,s,l,d;return e.__assign(e.__assign({},r),((n={})[t]={rows:null!==(u=null===(a=r[t])||void 0===a?void 0:a.rows)&&void 0!==u?u:[],cursor:null===(i=r[t])||void 0===i?void 0:i.cursor,hasMore:null!==(s=null===(o=r[t])||void 0===o?void 0:o.hasMore)&&void 0!==s&&s,loading:!0,loaded:null!==(d=null===(l=r[t])||void 0===l?void 0:l.loaded)&&void 0!==d&&d},n))}),d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,A({configId:f,baseUrl:c},e.__assign({startDate:ae.start,endDate:ae.end,filters:te,tableKey:t,pageSize:20},r?{cursor:r}:{}),n.signal)];case 2:return u=d.sent(),i=null!==(l=null===(s=u.table)||void 0===s?void 0:s[t])&&void 0!==l?l:[],a()?[2]:(be(function(r){var n,a,o=r[t];return o?e.__assign(e.__assign({},r),((n={})[t]={rows:e.__spreadArray(e.__spreadArray([],o.rows,!0),i,!0),cursor:null!==(a=u.nextCursor)&&void 0!==a?a:void 0,hasMore:u.hasNext,loading:!1,loaded:!0},n)):r}),[3,5]);case 3:return"AbortError"===(null==(o=d.sent())?void 0:o.name)||a()?[2]:(be(function(r){var n;return r[t]?e.__assign(e.__assign({},r),((n={})[t]=e.__assign(e.__assign({},r[t]),{loading:!1,hasMore:!1}),n)):r}),[3,5]);case 4:return de.current[t]===n&&delete de.current[t],[7];case 5:return[2]}})})},[f,c,ae,te,A]),pe=r.useCallback(function(t,r){var n;if(!r)return ce.current.delete(t),null===(n=de.current[t])||void 0===n||n.abort(),delete de.current[t],void be(function(r){var n=r,a=t;return n[a],e.__rest(n,["symbol"==typeof a?a:a+""])});ce.current.add(t),_e(t)},[_e]),De=r.useCallback(function(e){var t=ve[e];(null==t?void 0:t.hasMore)&&!t.loading&&t.cursor&&_e(e,t.cursor)},[_e,ve]);r.useEffect(function(){return function(){ce.current.clear(),Object.values(de.current).forEach(function(e){return e.abort()})}},[]),r.useEffect(function(){return he(),function(){var e;return null===(e=le.current)||void 0===e?void 0:e.abort()}},[he]);var Se=r.useCallback(function(e){if((null==e?void 0:e.startDate)&&(null==e?void 0:e.endDate)){var t=e.startDate.getTime(),r=e.endDate.getTime();ie.current&&ie.current.start===t&&ie.current.end===r||(ie.current={start:t,end:r},ue({start:e.startDate,end:e.endDate}))}null==E||E(e)},[E]),me=L||K&&!q;return z?x?t.jsx(t.Fragment,{children:x(z,ge)}):t.jsxs("div",e.__assign({style:{padding:24,color:"#b91c1c"}},{children:["Failed to load dashboard: ",z.message,t.jsx("button",e.__assign({onClick:ge,style:{marginLeft:12}},{children:"Retry"}))]})):!me&&k&&q&&ae?t.jsx(n.ExecutiveDashboard,{uiConfig:k,data:q,dataLoading:K,startDate:ae.start,endDate:ae.end,onDateChange:Se,onRefresh:function(){he()},selectedKpis:Q,onKpiChange:function(t,r){X(function(n){var a;return e.__assign(e.__assign({},n),((a={})[t]=r,a))})},sidebarVisible:W,onSidebarShow:function(){return G(!0)},onSidebarHide:function(){return G(!1)},filterValues:Z,onFilterChange:function(t,r){$(function(n){var a;return e.__assign(e.__assign({},n),((a={})[t]=r,a))})},onFilterReset:function(){if(k){var e={};k.data.sidebarFilters.forEach(function(t){e[t.id]="multiSelect"===t.type?[]:""}),$(e)}},onFilterApply:function(){re(Z),G(!1),null==C||C(Z)},appliedFilters:te,graphEmptyState:v,tables:b,tableLayout:g,sectionOrder:h,hiddenSections:_,tablePages:ve,onTableExpand:pe,onTableLoadMore:De}):j?t.jsx(t.Fragment,{children:j()}):t.jsx(u.DashboardSkeleton,{})}exports.ExecutiveDashboardWrapper=l,exports.default=l;
|
|
2
|
+
//# sourceMappingURL=ExecutiveDashboardWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutiveDashboardWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};exports.__assign=function(){return exports.__assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},exports.__assign.apply(this,arguments)},"function"==typeof SuppressedError&&SuppressedError,exports.__awaiter=function(t,e,r,n){return new(r||(r=Promise))(function(o,a){function c(t){try{l(n.next(t))}catch(t){a(t)}}function i(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(c,i)}l((n=n.apply(t,e||[])).next())})},exports.__extends=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)},exports.__generator=function(t,e){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},exports.__rest=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},exports.__spreadArray=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,a=e.length;o<a;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};
|
|
2
|
+
//# sourceMappingURL=_tslib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../_virtual/_tslib.js"),e=function(e){function r(t,r){var i=e.call(this,t)||this;return i.name="DashboardApiError",i.status=r,i}return t.__extends(r,e),r}(Error),r=function(t){return t.replace(/\/+$/,"")};function i(r,i,n){var a;return t.__awaiter(this,void 0,void 0,function(){var s,o;return t.__generator(this,function(t){switch(t.label){case 0:return[4,fetch(r,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i),signal:n})];case 1:if(!(s=t.sent()).ok)throw new e("Request failed with status ".concat(s.status),s.status);return[4,s.json()];case 2:if(!(o=t.sent()).success)throw new e((null===(a=o.error)||void 0===a?void 0:a.errorMessage)||"Request failed");return[2,o.data]}})})}function n(e,n){var a=e.configId,s=e.baseUrl,o=void 0===s?"":s;return t.__awaiter(this,void 0,void 0,function(){return t.__generator(this,function(t){return[2,i("".concat(r(o),"/federated/filters/ui"),{config_id:a},n)]})})}function a(e,n){var a=e.configId,s=e.baseUrl,o=void 0===s?"":s;return t.__awaiter(this,void 0,void 0,function(){var e;return t.__generator(this,function(t){switch(t.label){case 0:return[4,i("".concat(r(o),"/federated/filters/distinct-value"),{config_id:a},n)];case 1:return[2,(null==(e=t.sent())?void 0:e.sidebarFilters)||{}]}})})}function s(t){void 0===t&&(t={});var e={};return Object.entries(t).forEach(function(t){var r=t[0],i=t[1];Array.isArray(i)?i.length>0&&(e[r]=i):""!==i&&null!=i&&(e[r]=[i])}),e}exports.DashboardApiError=e,exports.fetchDashboardData=function(e,n,a){var o=e.configId,c=e.baseUrl,u=void 0===c?"":c;return t.__awaiter(this,void 0,void 0,function(){var e;return t.__generator(this,function(t){return e={config_id:o,dateFilters:{startDate:n.startDate?n.startDate.toISOString():"",endDate:n.endDate?n.endDate.toISOString():""},sidebarFilters:s(n.filters)},[2,i("".concat(r(u),"/federated/filters/get-data"),e,a)]})})},exports.fetchTableData=function(e,n,a){var o,c=e.configId,u=e.baseUrl,d=void 0===u?"":u;return t.__awaiter(this,void 0,void 0,function(){return t.__generator(this,function(e){return[2,i("".concat(r(d),"/federated/filters/table-data"),t.__assign({config_id:c,dateFilters:{startDate:n.startDate?n.startDate.toISOString():"",endDate:n.endDate?n.endDate.toISOString():""},sidebarFilters:s(n.filters),tableKey:n.tableKey,pageSize:null!==(o=n.pageSize)&&void 0!==o?o:20},n.cursor?{cursor:n.cursor}:{}),a)]})})},exports.fetchUIConfig=function(e,r){return t.__awaiter(this,void 0,void 0,function(){var i,s,o;return t.__generator(this,function(c){switch(c.label){case 0:return[4,Promise.all([n(e,r),a(e,r)])];case 1:return i=c.sent(),s=i[0],o=i[1],[2,{data:t.__assign(t.__assign({},s),{sidebarFilters:(s.sidebarFilters||[]).map(function(e){return t.__assign(t.__assign({},e),{options:o[e.schemaFilterName]||[]})})})}]}})})};
|
|
2
|
+
//# sourceMappingURL=dashboardApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboardApi.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),n=require("./styles/DashboardCardStyles.js");exports.BreakingNewsBanner=function(r){var t=r.items,a=r.accentBg,i=r.accentBorder,_=r.accentText;if(0===t.length)return null;var l={backgroundColor:a,borderColor:i};return s.jsxs(s.Fragment,{children:[s.jsx("div",e.__assign({style:e.__assign(e.__assign({},n.default.newsBanner),l)},{children:s.jsx("p",e.__assign({style:e.__assign(e.__assign({},n.default.newsBannerTitle),{color:_})},{children:"Breaking News"}))})),t.map(function(r,a){return s.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},n.default.newsItem),l),a===t.length-1?n.default.newsItemLast:{})},{children:[s.jsx("span",{style:e.__assign(e.__assign({},n.default.newsItemDot),{backgroundColor:n.NEWS_DOT_COLORS[r.level]})}),s.jsx("p",e.__assign({style:e.__assign(e.__assign({},n.default.newsItemText),{color:_})},{children:r.text}))]}),a)})]})};
|
|
2
|
+
//# sourceMappingURL=BreakingNewsBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BreakingNewsBanner.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("react"),n=require("./styles/DashboardCardStyles.js");exports.CardShell=function(a){for(var l=a.accent,r=a.iconBg,i=a.icon,c=a.title,o=a.badge,d=a.heroValue,h=a.heroLabel,u=a.heroColor,x=a.heroDelta,f=a.chartData,_=a.chartLabels,g=a.chartColor,y=a.chartPrefix,p=a.footer,j=a.children,v=s.useState(null),m=v[0],b=v[1],C=s.useRef(null),M=240,S=90,k=18,L=12,D=f&&f.length>0?Math.min.apply(Math,f):0,w=f&&f.length>0?Math.max.apply(Math,f):100,A=w-D===0?1:w-D,R=(f||[]).map(function(e,t){var s=f.length;return{x:s>1?k+t/(s-1)*204:120,y:78-(e-D)/A*66,value:e,index:t}}),W=R.length>0?"M ".concat(R[0].x," ").concat(R[0].y):"",T=0;T<R.length-1;T++){var q=R[T],B=R[T+1];W+=" C ".concat(q.x+(B.x-q.x)/3," ").concat(q.y,", ").concat(q.x+2*(B.x-q.x)/3," ").concat(B.y,", ").concat(B.x," ").concat(B.y)}var F,O,E=R.length>0?"".concat(W," L ").concat(R[R.length-1].x," ").concat(78," L ").concat(R[0].x," ").concat(78," Z"):"",H=null!==m?R[m]:null,P=function(e){return c.toLowerCase().includes("security")?String(Math.round(e)):"$"===y?"$".concat(e.toFixed(2)):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):String(e)},V=function(e){if(!e)return"Recent";var t=e.split(":");if(t.length<2)return e;var s=parseInt(t[0],10),n=t[1],a=s>=12?"PM":"AM";return"".concat(s=s%12||12,":").concat(n," ").concat(a)},z=(F=c.toLowerCase(),O=l.toLowerCase(),F.includes("security")||O.includes("red")||O.includes("rose")?n.default.themeRose:F.includes("finops")||O.includes("violet")||O.includes("purple")?n.default.themeViolet:F.includes("health")||O.includes("sky")||O.includes("emerald")?n.default.themeSky:F.includes("change")||O.includes("amber")||O.includes("orange")?n.default.themeAmber:n.default.themeNeutral);return t.jsxs("div",e.__assign({style:n.default.card},{children:[t.jsx("style",{children:n.DASHBOARD_CARD_KEYFRAMES}),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},n.default.cardHeader),z)},{children:[t.jsxs("div",e.__assign({style:n.default.headerTop},{children:[t.jsxs("div",e.__assign({style:n.default.headerIconTitle},{children:[t.jsx("div",e.__assign({style:e.__assign(e.__assign({},n.default.iconWrap),{backgroundColor:r})},{children:i})),t.jsx("h3",e.__assign({style:n.default.title},{children:c}))]})),t.jsx("span",e.__assign({style:n.default.badge},{children:o}))]})),t.jsxs("div",e.__assign({style:n.default.heroRow},{children:[t.jsxs("div",e.__assign({style:n.default.hero},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},n.default.heroValue),{color:u})},{children:d})),t.jsx("span",e.__assign({style:n.default.heroLabel},{children:h})),x&&t.jsx("span",e.__assign({style:e.__assign(e.__assign({},n.default.heroDelta),x.up?n.default.heroDeltaUp:n.default.heroDeltaDown)},{children:x.text}))]})),t.jsxs("div",e.__assign({style:n.default.chartCol},{children:[t.jsxs("div",e.__assign({style:n.default.chartHeader},{children:[t.jsx("span",{children:"Trend Timeline"}),H&&t.jsx("span",e.__assign({style:n.default.chartTooltip},{children:c.toLowerCase().includes("security")?"".concat(P(H.value)," alerts at ").concat(_?V(_[H.index]):""):"".concat(_?"".concat(V(_[H.index]),": "):"").concat(P(H.value))}))]})),t.jsx("div",e.__assign({style:n.default.chartWrap},{children:f&&f.length>1?t.jsxs("svg",e.__assign({ref:C,viewBox:"0 0 ".concat(M," ").concat(S),style:n.default.chartSvg,onMouseMove:function(e){if(C.current&&0!==R.length){for(var t=C.current.getBoundingClientRect(),s=(e.clientX-t.left)/t.width*M,n=0,a=Math.abs(R[0].x-s),l=1;l<R.length;l++){var r=Math.abs(R[l].x-s);r<a&&(a=r,n=l)}b(n)}},onMouseLeave:function(){return b(null)}},{children:[t.jsx("defs",{children:t.jsxs("linearGradient",e.__assign({id:"grad-".concat(c.replace(/\s+/g,"")),x1:"0",y1:"0",x2:"0",y2:"1"},{children:[t.jsx("stop",{offset:"0%",stopColor:g,stopOpacity:.12}),t.jsx("stop",{offset:"100%",stopColor:g,stopOpacity:0})]}))}),t.jsx("text",e.__assign({x:12,y:15,textAnchor:"end",style:{fontSize:8,fontWeight:900,letterSpacing:"-0.05em",fill:"#020617"}},{children:P(w)})),t.jsx("text",e.__assign({x:12,y:81,textAnchor:"end",style:{fontSize:8,fontWeight:900,letterSpacing:"-0.05em",fill:"#020617"}},{children:P(D)})),t.jsx("path",{d:E,fill:"url(#grad-".concat(c.replace(/\s+/g,""),")")}),t.jsx("path",{d:W,fill:"none",stroke:g,strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),H?t.jsxs(t.Fragment,{children:[t.jsx("line",{x1:H.x,y1:L,x2:H.x,y2:78,stroke:"#64748b",strokeWidth:.75,strokeDasharray:"2,2"}),t.jsx("circle",{cx:H.x,cy:H.y,r:4,fill:g,opacity:.2}),t.jsx("circle",{cx:H.x,cy:H.y,r:2,fill:g,stroke:"#ffffff",strokeWidth:1})]}):R.length>0&&t.jsx("circle",{cx:R[R.length-1].x,cy:R[R.length-1].y,r:2.5,fill:g})]})):t.jsx("span",e.__assign({style:n.default.chartEmpty},{children:"No live telemetry"}))}))]}))]}))]})),t.jsx("div",e.__assign({style:n.default.body},{children:j})),p&&t.jsx("div",e.__assign({style:n.default.footer},{children:p}))]}))};
|
|
2
|
+
//# sourceMappingURL=CardShell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardShell.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),l=require("./styles/DashboardCardStyles.js"),r=require("./TopDropdownMenu.js");exports.CenteredCell=function(n){var o=n.item;return s.jsxs("div",e.__assign({style:l.default.centeredCell,onClick:o.onClick},{children:[o.dropdown&&s.jsx(r.TopDropdownMenu,{config:o.dropdown}),s.jsx("div",e.__assign({style:l.default.centeredCellLabel},{children:o.label})),s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.default.centeredCellValue),o.valueColor?{color:o.valueColor}:{})},{children:o.value})),o.sub&&s.jsx("div",e.__assign({style:e.__assign(e.__assign({},l.default.centeredCellSub),o.subColor?{color:o.subColor}:{})},{children:o.sub}))]}))};
|
|
2
|
+
//# sourceMappingURL=CenteredCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CenteredCell.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("react"),n=require("./styles/DashboardCardStyles.js"),o=require("./CardShell.js"),a=require("./SkeletonRow.js"),i=require("./BreakingNewsBanner.js"),l=require("./SectionHeadingBar.js"),s=require("./FooterLinkButton.js"),c=require("./sectionContent.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(t);exports.DashboardCard=function(t){var u=t.accent,h=t.iconBg,g=t.icon,f=t.title,j=t.badge,b=void 0===j?"Today":j,x=t.heroValue,C=t.heroLabel,B=t.heroColor,_=t.heroDelta,k=t.chartData,q=t.chartLabels,v=t.chartColor,p=void 0===v?"#6366f1":v,L=t.chartPrefix,y=void 0===L?"":L,S=t.loading,m=t.footer,D=t.footerLinks,w=t.breakingNews,F=t.accentBg,N=t.accentBorder,P=t.accentText,T=t.sections,H=null!=m?m:D&&D.length>0?r.jsx("div",e.__assign({style:e.__assign(e.__assign({},n.default.footerLinks),D.length>1?n.default.footerLinksMulti:{})},{children:D.map(function(e,t){return r.jsx(s.FooterLinkButton,{label:e.label,onClick:e.onClick},t)})})):null;return r.jsx(o.CardShell,e.__assign({accent:u,iconBg:h,icon:g,title:f,badge:b,heroValue:x,heroLabel:C,heroColor:B,heroDelta:_,chartData:null!=k?k:null,chartLabels:q,chartColor:p,chartPrefix:y,footer:H},{children:S?r.jsx(r.Fragment,{children:[0,1,2].map(function(e){return r.jsx(a.SkeletonRow,{},e)})}):r.jsxs("div",e.__assign({style:n.default.bodyContent},{children:[r.jsx(i.BreakingNewsBanner,{items:w,accentBg:F,accentBorder:N,accentText:P}),T.map(function(e,t){return r.jsxs(d.default.Fragment,{children:[r.jsx(l.SectionHeadingBar,{label:e.heading,color:e.headingColor,dotColor:e.dotColor,count:e.count,pulse:e.pulse}),c.renderSectionContent(e)]},t)})]}))}))};
|
|
2
|
+
//# sourceMappingURL=DashboardCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),a=require("react"),t=require("lucide-react"),i=require("./styles/DashboardCardStyles.js");exports.DetailRow=function(l){var r=l.label,n=l.value,o=l.sub,u=l.onClick,d=l.valueColor,_=a.useState(!1),c=_[0],f=_[1],g=u?"button":"div";return s.jsxs(g,e.__assign({onClick:u,onMouseEnter:function(){return u&&f(!0)},onMouseLeave:function(){return u&&f(!1)},style:e.__assign(e.__assign(e.__assign({},i.default.detailRow),u?i.default.detailRowClickable:{}),u&&c?{backgroundColor:"#f8fafc"}:{})},{children:[s.jsxs("div",e.__assign({style:i.default.detailRowMain},{children:[s.jsx("p",e.__assign({style:i.default.detailRowLabel},{children:r})),s.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.default.detailRowValue),d?{color:d}:{})},{children:n})),o&&s.jsx("p",e.__assign({style:i.default.detailRowSub},{children:o}))]})),u&&s.jsx(t.ChevronRight,{size:14,style:e.__assign(e.__assign({},i.default.detailRowChevron),c?i.default.detailRowChevronHover:{})})]}))};
|
|
2
|
+
//# sourceMappingURL=DetailRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailRow.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("react"),n=require("lucide-react"),a=require("./styles/DashboardCardStyles.js"),l={BLOCKED:{action:"Request blocked — review policy rule",color:a.ACTION_COLORS.BLOCKED},FLAGGED:{action:"Flagged for review — investigate source",color:a.ACTION_COLORS.FLAGGED},ALLOWED:{action:"Allowed through — monitor for patterns",color:a.ACTION_COLORS.ALLOWED}};function i(e){var t=Math.floor((Date.now()-e.getTime())/1e3);if(t<60)return"just now";var s=Math.floor(t/60);if(s<60)return"".concat(s,"m ago");var n=Math.floor(s/60);return n<24?"".concat(n,"h ago"):"".concat(Math.floor(n/24),"d ago")}var r=function(r){var o,d,u,c,_=r.event,g=s.useState(!1),f=g[0],v=g[1],y=s.useState(!1),h=y[0],m=y[1],x=s.useState(!1),j=x[0],S=x[1],T=null!==(o=a.SEV_BADGE_STYLES[_.severity])&&void 0!==o?o:a.SEV_BADGE_DEFAULT,L=_.status&&null!==(d=l[_.status])&&void 0!==d?d:null;return t.jsxs("div",e.__assign({style:a.default.eventRowWrap},{children:[t.jsxs("button",e.__assign({onClick:function(){return v(!0)},onMouseEnter:function(){return m(!0)},onMouseLeave:function(){return m(!1)},style:e.__assign(e.__assign({},a.default.eventRow),h?a.default.eventRowHover:{})},{children:[t.jsx("span",{style:e.__assign(e.__assign({},a.default.eventRowDot),{backgroundColor:null!==(u=a.SEV_DOT_COLORS[_.severity])&&void 0!==u?u:"#cbd5e1"})}),t.jsx("p",e.__assign({style:a.default.eventRowTitle},{children:_.title})),t.jsx("span",e.__assign({style:a.default.eventRowTime},{children:i(_.timestamp)})),t.jsx(n.ChevronRight,{size:10,style:a.default.eventRowChevron})]})),f&&t.jsx("div",e.__assign({style:a.default.modalOverlay},{children:t.jsxs("div",e.__assign({style:a.default.modal},{children:[t.jsxs("div",e.__assign({style:a.default.modalHeader},{children:[t.jsxs("div",e.__assign({style:a.default.modalHeaderLeft},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},a.default.modalBadge),T)},{children:_.severity})),_.status&&t.jsx("span",e.__assign({style:e.__assign(e.__assign({},a.default.modalStatusBadge),null!==(c=a.STATUS_BADGE_STYLES[_.status])&&void 0!==c?c:a.STATUS_BADGE_DEFAULT)},{children:_.status})),t.jsx("span",e.__assign({style:a.default.modalTitle},{children:_.title}))]})),t.jsx("button",e.__assign({onClick:function(){return v(!1)},style:a.default.modalClose,onMouseEnter:function(e){e.currentTarget.style.color="#475569",e.currentTarget.style.backgroundColor="rgba(226,232,240,0.5)"},onMouseLeave:function(e){e.currentTarget.style.color="#94a3b8",e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(n.X,{size:14})}))]})),t.jsxs("div",e.__assign({style:a.default.modalBody},{children:[_.triageSummary&&t.jsxs("div",{children:[t.jsx("h4",e.__assign({style:a.default.modalSectionTitle},{children:"Summary"})),t.jsx("p",e.__assign({style:a.default.modalSummaryText},{children:_.triageSummary}))]}),_.details&&_.details.length>0&&t.jsxs("div",e.__assign({style:a.default.modalBodySpacer},{children:[t.jsx("h4",e.__assign({style:e.__assign(e.__assign({},a.default.modalSectionTitle),a.default.modalSectionTitleTight)},{children:"Metadata Details"})),t.jsx("div",e.__assign({style:a.default.modalDetailsGrid},{children:_.details.map(function(s){return t.jsxs("div",e.__assign({style:a.default.modalDetail},{children:[t.jsx("span",e.__assign({style:a.default.modalDetailLabel},{children:s.label})),t.jsx("span",e.__assign({style:a.default.modalDetailValue},{children:s.value}))]}),s.label)})}))]})),_.incidentUrl&&t.jsx("div",e.__assign({style:e.__assign(e.__assign({},a.default.modalLinkRow),a.default.modalBodySpacer)},{children:t.jsx("a",e.__assign({href:_.incidentUrl,target:"_blank",rel:"noopener noreferrer",style:a.default.modalLink,onMouseEnter:function(e){e.currentTarget.style.color="#4338ca",e.currentTarget.style.textDecoration="underline"},onMouseLeave:function(e){e.currentTarget.style.color="#6366f1",e.currentTarget.style.textDecoration="none"}},{children:"View External Incident →"}))}))]})),L&&t.jsx("div",e.__assign({style:a.default.modalActionRow},{children:t.jsxs("button",e.__assign({onClick:function(){var e;v(!1),null===(e=_.onAction)||void 0===e||e.call(_)},onMouseEnter:function(){return S(!0)},onMouseLeave:function(){return S(!1)},style:e.__assign(e.__assign({},a.default.modalActionBtn),j?a.default.modalActionBtnHover:{})},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},a.default.modalActionText),{color:L.color})},{children:L.action})),t.jsx(n.ChevronRight,{size:12,style:e.__assign(e.__assign(e.__assign({},a.default.modalActionChevron),{color:L.color}),j?a.default.modalActionChevronHover:{})})]}))}))]}))}))]}))};exports.renderEventsSection=function(e){return t.jsx("div",{children:e.map(function(e){return t.jsx(r,{event:e},e.id)})})};
|
|
2
|
+
//# sourceMappingURL=EventsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventsSection.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("lucide-react"),n=require("./styles/DashboardCardStyles.js");exports.FooterLinkButton=function(o){var s=o.label,u=o.onClick;return r.jsxs("button",e.__assign({onClick:u,style:n.default.footerLink,onMouseEnter:function(e){return e.currentTarget.style.color="#4338ca"},onMouseLeave:function(e){return e.currentTarget.style.color="#6366f1"}},{children:[s," ",r.jsx(t.ChevronRight,{size:11})]}))};
|
|
2
|
+
//# sourceMappingURL=FooterLinkButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterLinkButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("./styles/DashboardCardStyles.js"),l=require("./CenteredCell.js"),s=require("./TopDropdownMenu.js"),n=require("./DetailRow.js");exports.renderGridSection=function(d,o,a){for(var t=[],u=0;u<d.length;u+=o)t.push(d.slice(u,u+o));return r.jsx("div",{children:t.map(function(d,t){return r.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},i.default.gridRow),{gridTemplateColumns:"repeat(".concat(o,", minmax(0, 1fr))")}),t>0?i.default.gridRowDivider:{})},{children:d.map(function(d,o){return r.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},i.default.gridCell),a?{}:i.default.gridCellPadded),o>0?i.default.gridCellDivider:{})},{children:a?r.jsx(l.CenteredCell,{item:d}):r.jsxs(r.Fragment,{children:[d.dropdown&&r.jsx(s.TopDropdownMenu,{config:d.dropdown}),r.jsx("div",e.__assign({style:i.default.gridCellInner,onClick:d.dropdown?d.onClick:void 0},{children:r.jsx(n.DetailRow,{label:d.label,value:d.value,sub:d.sub,onClick:d.dropdown?void 0:d.onClick,valueColor:d.valueColor})}))]})}),o)})}),t)})})};
|
|
2
|
+
//# sourceMappingURL=GridSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridSection.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("react"),t=require("./styles/DashboardCardStyles.js"),n=function(n){var l,r,a=n.item,o=n.compact,u=i.useState(!1),d=u[0],c=u[1];return s.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},t.default.listRow),o?t.default.listRowCompact:{}),d?t.default.listRowHover:{}),onClick:a.onClick,onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)}},{children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{style:e.__assign(e.__assign({},t.default.listRowDot),{backgroundColor:null!==(l=a.dotColor)&&void 0!==l?l:"#cbd5e1",animation:"dc-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite"})}),s.jsx("p",e.__assign({style:t.default.alertRowValue},{children:a.value})),a.sub&&s.jsx("span",e.__assign({style:t.default.alertRowSub},{children:a.sub}))]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{style:e.__assign(e.__assign({},t.default.listRowDot),{backgroundColor:null!==(r=a.dotColor)&&void 0!==r?r:"#cbd5e1"})}),s.jsxs("div",e.__assign({style:t.default.listRowMain},{children:[s.jsx("p",e.__assign({style:t.default.listRowValue},{children:a.value})),a.sub&&s.jsx("p",e.__assign({style:t.default.listRowSub},{children:a.sub}))]})),s.jsx("span",e.__assign({style:t.default.listRowLabel},{children:a.label}))]})}))};exports.renderAlertsSection=function(i){return s.jsx("div",{children:i.map(function(i,l){return s.jsx("div",e.__assign({style:l>0?t.default.listRowDivider:void 0},{children:s.jsx(n,{item:i,compact:!0})}),l)})})},exports.renderListSection=function(i){return s.jsx("div",{children:i.map(function(i,l){return s.jsx("div",e.__assign({style:l>0?t.default.listRowDivider:void 0},{children:s.jsx(n,{item:i})}),l)})})};
|
|
2
|
+
//# sourceMappingURL=ListSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSection.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),i=require("./styles/DashboardCardStyles.js");exports.SectionHeadingBar=function(n){var a=n.label,t=n.color,l=n.dotColor,r=n.count,o=n.pulse;return s.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.default.sectionHeading),null!=t?t:i.default.sectionHeadingDefault)},{children:[l&&s.jsx("span",{style:e.__assign(e.__assign(e.__assign({},i.default.sectionHeadingDot),{backgroundColor:l}),o?{animation:"dc-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite"}:{})}),s.jsx("p",e.__assign({style:i.default.sectionHeadingLabel},{children:a})),void 0!==r&&s.jsx("span",e.__assign({style:i.default.sectionHeadingCount},{children:r}))]}))};
|
|
2
|
+
//# sourceMappingURL=SectionHeadingBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeadingBar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),t=require("./styles/DashboardCardStyles.js");exports.SkeletonRow=function(){return s.jsxs("div",e.__assign({style:t.default.skeletonRow},{children:[s.jsx("div",{style:e.__assign(e.__assign({},t.default.skeletonLine),t.default.skeletonLineTitle)}),s.jsx("div",{style:e.__assign(e.__assign({},t.default.skeletonLine),t.default.skeletonLineValue)})]}))};
|
|
2
|
+
//# sourceMappingURL=SkeletonRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonRow.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("../../_virtual/_tslib.js"),e=require("react/jsx-runtime"),t=require("./styles/DashboardCardStyles.js");exports.renderTagsSection=function(a){var l,n;return e.jsxs("div",s.__assign({style:t.default.tags},{children:[e.jsx("div",s.__assign({style:t.default.tagsTop},{children:e.jsxs("div",s.__assign({style:t.default.tagsMeta},{children:[e.jsx("span",s.__assign({style:t.default.tagsLabel},{children:a.label})),e.jsxs("span",s.__assign({style:t.default.tagsCount},{children:[a.count," ",null!==(l=a.countSuffix)&&void 0!==l?l:1===a.count?"Item":"Items"]}))]}))})),e.jsx("div",s.__assign({style:t.default.tagsList},{children:a.tags.length>0?a.tags.map(function(a,l){var n;return e.jsxs("span",s.__assign({style:t.default.tag},{children:[e.jsx("span",{style:s.__assign(s.__assign({},t.default.tagDot),{backgroundColor:null!==(n=a.dotColor)&&void 0!==n?n:"#94a3b8"})}),a.label]}),l)}):e.jsx("span",s.__assign({style:t.default.tagsEmpty},{children:null!==(n=a.emptyText)&&void 0!==n?n:"No items detected"}))}))]}))};
|
|
2
|
+
//# sourceMappingURL=TagsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsSection.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),r=require("react"),t=require("./styles/DashboardCardStyles.js");exports.TopDropdownMenu=function(s){var o=s.config,a=r.useState(!1),i=a[0],l=a[1];return n.jsxs(n.Fragment,{children:[n.jsxs("button",e.__assign({onClick:function(e){e.stopPropagation(),l(!i)},style:e.__assign(e.__assign({},t.default.dropdownTrigger),i?t.default.dropdownTriggerOpen:t.default.dropdownTriggerClosed)},{children:["Top ",o.items.length," ▾"]})),i&&n.jsx("div",e.__assign({style:t.default.dropdownPanel,onMouseLeave:function(){return l(!1)}},{children:n.jsxs("div",e.__assign({style:t.default.dropdownInner},{children:[n.jsx("span",e.__assign({style:t.default.dropdownTitle},{children:o.title})),o.items.map(function(r,s){return n.jsxs("button",e.__assign({onClick:function(e){var n;e.stopPropagation(),null===(n=o.onClick)||void 0===n||n.call(o)},style:t.default.dropdownItem,onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#f8fafc"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:[n.jsxs("span",e.__assign({style:t.default.dropdownItemName},{children:[s+1,". ",r.name]})),n.jsx("span",e.__assign({style:t.default.dropdownItemValue},{children:r.value}))]}),s)})]}))}))]})};
|
|
2
|
+
//# sourceMappingURL=TopDropdownMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopDropdownMenu.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./GridSection.js"),t=require("./ListSection.js"),r=require("./TagsSection.js"),n=require("./EventsSection.js");exports.renderSectionContent=function(i){var s,o;if(i.content)return i.content;if("tags"===i.format&&i.tagsConfig)return r.renderTagsSection(i.tagsConfig);if("events"===i.format&&i.events)return n.renderEventsSection(i.events);if(!i.items||0===i.items.length)return null;switch(i.format){case"grid":return e.renderGridSection(i.items,null!==(s=i.columns)&&void 0!==s?s:2,i.centered);case"list":return t.renderListSection(i.items);case"alerts":return t.renderAlertsSection(i.items);default:return e.renderGridSection(i.items,null!==(o=i.columns)&&void 0!==o?o:2,i.centered)}};
|
|
2
|
+
//# sourceMappingURL=sectionContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionContent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',o={card:{display:"flex",flexDirection:"column",background:"#ffffff",borderRadius:12,border:"1px solid #f1f5f9",boxShadow:"0 1px 2px 0 rgba(0,0,0,0.05)",overflow:"visible",textAlign:"left",height:"100%",fontFamily:e,lineHeight:1.5},cardHeader:{padding:16,borderRadius:"12px 12px 0 0",position:"relative",borderBottom:"1px solid rgba(241,245,249,0.6)"},themeRose:{background:"linear-gradient(to bottom, rgba(255,228,230,0.6), rgba(254,242,242,0.35), #ffffff)"},themeViolet:{background:"linear-gradient(to bottom, rgba(237,233,254,0.6), rgba(250,245,255,0.35), #ffffff)"},themeSky:{background:"linear-gradient(to bottom, rgba(224,242,254,0.5), rgba(238,242,255,0.3), #ffffff)"},themeAmber:{background:"linear-gradient(to bottom, rgba(254,249,195,0.5), rgba(255,251,235,0.3), #ffffff)"},themeNeutral:{background:"linear-gradient(to bottom, rgba(241,245,249,0.5), rgba(248,250,252,0.25), #ffffff)"},headerTop:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},headerIconTitle:{display:"flex",alignItems:"center",gap:6},iconWrap:{padding:4,borderRadius:4,flexShrink:0},title:{margin:0,fontSize:12,fontWeight:700,color:"#334155",textTransform:"uppercase",letterSpacing:"0.05em"},badge:{fontSize:10,fontWeight:700,color:"#64748b",background:"rgba(255,255,255,0.8)",padding:"2px 6px",borderRadius:9999,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.05)",border:"1px solid rgba(241,245,249,0.4)"},heroRow:{display:"grid",gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gap:12,alignItems:"center",minHeight:96},hero:{gridColumn:"span 4 / span 4",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",borderRight:"1px solid rgba(241,245,249,0.8)",paddingRight:8},heroValue:{fontSize:24,fontWeight:800,letterSpacing:"-0.025em",lineHeight:1},heroLabel:{fontSize:9,fontWeight:700,color:"#334155",marginTop:4,lineHeight:1.25,textTransform:"uppercase",letterSpacing:"0.025em"},heroDelta:{fontSize:9,fontWeight:700,marginTop:4},heroDeltaUp:{color:"#f43f5e"},heroDeltaDown:{color:"#059669"},chartCol:{gridColumn:"span 8 / span 8",width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"visible",userSelect:"none",paddingLeft:4},chartHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:8,fontWeight:900,color:"#1e293b",textTransform:"uppercase",padding:"0 4px",letterSpacing:"0.05em"},chartTooltip:{color:"#4f46e5",background:"#eef2ff",padding:"2px 6px",borderRadius:4,fontWeight:900,fontSize:9,whiteSpace:"nowrap",boxShadow:"0 1px 2px 0 rgba(0,0,0,0.05)",border:"1px solid rgba(224,231,255,0.3)"},chartWrap:{width:"100%",flex:"1 1 0%",position:"relative",overflow:"visible",marginTop:4},chartSvg:{width:"100%",height:"100%",overflow:"visible",cursor:"crosshair"},chartEmpty:{fontSize:10,color:"#94a3b8",fontWeight:700,position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},body:{flex:"1 1 0%",overflow:"visible"},footer:{background:"rgba(248,250,252,0.6)",padding:"8px 16px",borderTop:"1px solid #f1f5f9",borderRadius:"0 0 12px 12px",overflow:"visible"},bodyContent:{display:"flex",flexDirection:"column",color:"#334155"},footerLinks:{display:"flex"},footerLinksMulti:{width:"100%",justifyContent:"space-between",alignItems:"center"},footerLink:{textAlign:"left",padding:"12px 16px",fontSize:12,color:"#6366f1",display:"flex",alignItems:"center",gap:2,transition:"color 0.15s ease",background:"none",border:"none",cursor:"pointer",margin:0,fontFamily:"inherit"},skeletonRow:{padding:"12px 16px"},skeletonLine:{borderRadius:4,background:"#f8fafc",animation:"dc-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite"},skeletonLineTitle:{height:12,width:64},skeletonLineValue:{height:16,width:96,background:"#f1f5f9",marginTop:6},sectionHeading:{padding:"8px 16px",display:"flex",alignItems:"center",gap:8,borderTop:"1px solid",borderBottom:"1px solid"},sectionHeadingDefault:{background:"#f8fafc",borderColor:"#e2e8f0",color:"#64748b"},sectionHeadingDot:{width:8,height:8,borderRadius:9999,flexShrink:0},sectionHeadingLabel:{margin:0,fontSize:12,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",color:"inherit"},sectionHeadingCount:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:9999,marginLeft:"auto",opacity:.8,background:"rgba(0,0,0,0.06)"},newsBanner:{padding:"8px 16px",display:"flex",alignItems:"center",gap:8,borderTop:"1px solid",borderBottom:"1px solid"},newsBannerTitle:{margin:0,fontSize:12,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em"},newsItem:{display:"flex",alignItems:"flex-start",gap:8,padding:"8px 16px",borderBottom:"1px solid"},newsItemLast:{borderBottom:"none"},newsItemDot:{width:6,height:6,borderRadius:9999,marginTop:4,flexShrink:0,animation:"dc-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite"},newsItemText:{margin:0,fontSize:11,fontWeight:500,lineHeight:1.625},dropdownTrigger:{position:"absolute",right:6,top:4,padding:"2px 4px",borderRadius:4,fontSize:8,fontWeight:900,letterSpacing:"0.025em",textTransform:"uppercase",transition:"background-color 0.15s ease, color 0.15s ease",zIndex:10,border:"none",cursor:"pointer",margin:0,fontFamily:"inherit"},dropdownTriggerClosed:{background:"#f1f5f9",color:"#64748b"},dropdownTriggerOpen:{background:"#4f46e5",color:"#ffffff"},dropdownPanel:{position:"absolute",left:0,right:0,top:36,paddingTop:4,zIndex:50,pointerEvents:"auto"},dropdownInner:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:8,boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)",padding:8,display:"flex",flexDirection:"column",gap:4,textAlign:"left"},dropdownTitle:{fontSize:9,fontWeight:700,color:"#4f46e5",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:2,padding:"0 4px"},dropdownItem:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:10,padding:4,borderRadius:4,transition:"background-color 0.15s ease",textAlign:"left",background:"none",border:"none",cursor:"pointer",margin:0,fontFamily:"inherit"},dropdownItemName:{fontWeight:600,color:"#334155",maxWidth:95,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dropdownItemValue:{color:"#6366f1",fontWeight:500,flexShrink:0},detailRow:{width:"100%",textAlign:"left",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"12px 16px",background:"none",border:"none",margin:0,fontFamily:"inherit"},detailRowClickable:{cursor:"pointer",transition:"background-color 0.15s ease"},detailRowMain:{minWidth:0},detailRowLabel:{margin:0,fontSize:12,color:"#94a3b8"},detailRowValue:{margin:0,fontSize:14,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:2,color:"#1e293b"},detailRowSub:{margin:0,fontSize:12,color:"#94a3b8",marginTop:2},detailRowChevron:{color:"#e2e8f0",transition:"color 0.15s ease",flexShrink:0},detailRowChevronHover:{color:"#94a3b8"},centeredCell:{padding:"16px 8px",minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",cursor:"pointer",userSelect:"none",position:"relative"},centeredCellLabel:{fontSize:10,color:"#94a3b8",fontWeight:500,lineHeight:1,width:"100%"},centeredCellValue:{fontSize:14,fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:6,width:"100%",maxWidth:100,color:"#334155"},centeredCellSub:{fontSize:10,fontWeight:700,marginTop:6,lineHeight:1.25,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#94a3b8"},gridRow:{display:"grid"},gridCell:{minWidth:0,position:"relative"},gridCellPadded:{padding:6},gridCellInner:{padding:6},gridRowDivider:{borderTop:"1px solid #f1f5f9"},gridCellDivider:{borderLeft:"1px solid #f1f5f9"},listRow:{display:"flex",alignItems:"center",gap:8,padding:"12px 16px",transition:"background-color 0.15s ease"},listRowCompact:{padding:"8px 16px"},listRowDivider:{borderTop:"1px solid rgba(241,245,249,0.6)"},listRowHover:{background:"rgba(248,250,252,0.4)"},listRowDot:{width:6,height:6,borderRadius:9999,flexShrink:0},listRowDotDefault:{background:"#cbd5e1"},listRowMain:{minWidth:0,flex:"1 1 0%",textAlign:"left"},listRowValue:{margin:0,fontSize:12,color:"#475569",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},listRowSub:{margin:0,fontSize:10,color:"#cbd5e1",lineHeight:1,marginTop:2},listRowLabel:{fontSize:10,color:"#94a3b8",flexShrink:0,fontWeight:500},alertRowValue:{margin:0,fontSize:12,color:"#475569",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:"1 1 0%",textAlign:"left"},alertRowSub:{fontSize:10,color:"#cbd5e1",flexShrink:0},tags:{borderBottom:"1px solid #f1f5f9",padding:"16px 20px",display:"flex",flexDirection:"column",textAlign:"left"},tagsTop:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},tagsMeta:{display:"flex",flexDirection:"column"},tagsLabel:{fontSize:11,color:"#94a3b8",fontWeight:500},tagsCount:{fontSize:14,fontWeight:700,color:"#334155",marginTop:2},tagsList:{display:"flex",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,marginTop:8,fontSize:11,color:"#64748b",fontWeight:500},tag:{display:"flex",alignItems:"center",gap:4},tagDot:{width:4,height:4,borderRadius:9999,flexShrink:0},tagDotDefault:{background:"#94a3b8"},tagsEmpty:{fontStyle:"italic",color:"#94a3b8"},eventRowWrap:{borderTop:"1px solid #f1f5f9"},eventRow:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"14px 16px",transition:"background-color 0.15s ease",background:"none",border:"none",cursor:"pointer",margin:0,fontFamily:"inherit"},eventRowHover:{background:"rgba(248,250,252,0.8)"},eventRowDot:{width:4,height:4,borderRadius:9999,flexShrink:0},eventRowDotDefault:{background:"#cbd5e1"},eventRowTitle:{margin:0,fontSize:11,color:"#475569",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:"1 1 0%",textAlign:"left"},eventRowTime:{fontSize:9,color:"#cbd5e1",flexShrink:0,marginRight:4},eventRowChevron:{color:"#cbd5e1",flexShrink:0},modalOverlay:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(15,23,42,0.4)",backdropFilter:"blur(4px)",padding:16},modal:{background:"#ffffff",width:"100%",maxWidth:512,borderRadius:12,boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)",border:"1px solid #e2e8f0",overflow:"hidden"},modalHeader:{padding:"12px 16px",background:"#f8fafc",borderBottom:"1px solid rgba(226,232,240,0.8)",display:"flex",alignItems:"center",justifyContent:"space-between"},modalHeaderLeft:{display:"flex",alignItems:"center",gap:8,maxWidth:"85%"},modalBadge:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:6},modalStatusBadge:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:6},modalTitle:{margin:0,fontSize:12,fontWeight:600,color:"#334155",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},modalClose:{color:"#94a3b8",padding:4,borderRadius:8,transition:"background-color 0.15s ease, color 0.15s ease",background:"none",border:"none",cursor:"pointer",display:"flex",margin:0,fontFamily:"inherit"},modalCloseHover:{color:"#475569",background:"rgba(226,232,240,0.5)"},modalBody:{maxHeight:"60vh",overflowY:"auto",padding:16},modalBodySpacer:{marginTop:16},modalSectionTitle:{margin:0,fontSize:10,fontWeight:700,color:"#94a3b8",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:4},modalSectionTitleTight:{marginBottom:6},modalSummaryText:{margin:0,fontSize:12,color:"#475569",lineHeight:1.625,background:"#f8fafc",padding:10,borderRadius:8,border:"1px solid #f1f5f9"},modalDetailsGrid:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:16,rowGap:8,background:"rgba(248,250,252,0.5)",padding:12,borderRadius:8,border:"1px solid #f1f5f9"},modalDetail:{display:"flex",flexDirection:"column"},modalDetailLabel:{fontSize:10,color:"#94a3b8",fontWeight:500},modalDetailValue:{fontSize:12,color:"#334155",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},modalLinkRow:{display:"flex",alignItems:"center",gap:12,paddingTop:8},modalLink:{fontSize:12,fontWeight:500,color:"#6366f1",textDecoration:"none"},modalActionRow:{borderTop:"1px solid #f1f5f9",background:"rgba(248,250,252,0.5)",padding:12,display:"flex",justifyContent:"flex-end"},modalActionBtn:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:8,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.05)",transition:"background-color 0.15s ease",cursor:"pointer",margin:0,fontFamily:"inherit"},modalActionBtnHover:{background:"#f8fafc"},modalActionText:{fontSize:12,fontWeight:600},modalActionChevron:{transition:"transform 0.15s ease"},modalActionChevronHover:{transform:"translateX(2px)"}};exports.ACTION_COLORS={BLOCKED:"#dc2626",FLAGGED:"#d97706",ALLOWED:"#059669"},exports.DASHBOARD_CARD_FONT_FAMILY=e,exports.DASHBOARD_CARD_KEYFRAMES="\n@keyframes dc-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n",exports.NEWS_DOT_COLORS={critical:"#ef4444",warning:"#fbbf24",info:"#34d399"},exports.SEV_BADGE_DEFAULT={background:"#f8fafc",color:"#64748b"},exports.SEV_BADGE_STYLES={CRITICAL:{background:"#fef2f2",color:"#dc2626"},HIGH:{background:"#fffbeb",color:"#d97706"},MEDIUM:{background:"#fefce8",color:"#a16207"},LOW:{background:"#ecfdf5",color:"#059669"},POLICY:{background:"#f5f3ff",color:"#7c3aed"}},exports.SEV_DOT_COLORS={CRITICAL:"#ef4444",HIGH:"#f59e0b",MEDIUM:"#facc15",LOW:"#34d399",POLICY:"#8b5cf6"},exports.STATUS_BADGE_DEFAULT={background:"#f1f5f9",color:"#64748b"},exports.STATUS_BADGE_STYLES={BLOCKED:{background:"#fee2e2",color:"#b91c1c"},FLAGGED:{background:"#fef3c7",color:"#b45309"},ALLOWED:{background:"#d1fae5",color:"#047857"}},exports.default=o;
|
|
2
|
+
//# sourceMappingURL=DashboardCardStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardCardStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),s=require("react"),i=require("primereact/button"),a=require("lucide-react"),n=require("../DatePickers/DateSelector.js"),l=require("./datePreset.js");exports.default=function(r){var o,u,d,c,v=r.presets,f=void 0===v?l.DEFAULT_DATE_PRESETS:v,x=r.filterCount,m=void 0===x?0:x,h=r.liveDuration,p=void 0===h?3e4:h,g=r.onDateChange,j=r.onRefresh,_=r.isRefreshLoading,D=r.onFilterClick,q=r.showFilterButton,b=void 0===q||q,C=r.showLiveButton,N=void 0===C||C,k=r.showFilterCount,y=void 0!==k&&k,E=r.datePickerProps,w=r.initialStartDate,F=r.initialEndDate,R=r.defaultPresets,S=s.useState(null!=R?R:"today"),P=S[0],B=S[1],T=s.useState(!0),L=T[0],A=T[1],z=s.useState(w||null),W=z[0],I=z[1],M=s.useState(F||null),O=M[0],U=M[1];s.useEffect(function(){I(w||null),U(F||null)},[w,F]);var G=s.useState(!1),H=G[0],J=G[1];s.useEffect(function(){var e=setTimeout(function(){A(!1)},p);return function(){return clearTimeout(e)}},[P,p]),s.useEffect(function(){if("custom"!==P){var e=f.find(function(e){return e.value===P});if(e&&e.getRange){var t=e.getRange();null==g||g({preset:P,startDate:t.startDate,endDate:t.endDate})}}},[P,f,g]);var K=f;return t.jsxs("div",e.__assign({className:"q-date-filter"},{children:[t.jsxs("div",e.__assign({className:"q-date-filter-toolbar"},{children:[t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[t.jsx("div",e.__assign({className:"q-preset-container"},{children:null==K?void 0:K.map(function(s){return t.jsx("button",e.__assign({className:"q-preset-btn ".concat(P===(null==s?void 0:s.value)?"active":""),onClick:function(){return B(null==s?void 0:s.value)}},{children:null==s?void 0:s.label}),null==s?void 0:s.value)})})),N&&(L?t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{width:"1px",height:"31px",backgroundColor:"#CBD5E1"}}),t.jsxs("div",e.__assign({className:"q-live-chip"},{children:[t.jsx("span",{className:"q-live-dot"}),"Live Data"]}))]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"q-date-separator",style:{width:"1px",height:"31px",backgroundColor:"#CBD5E1"}}),t.jsxs(i.Button,e.__assign({className:"q-refresh-btn",onClick:j},{children:[t.jsx(a.RefreshCw,{size:16,strokeWidth:2.5,className:_?"q-spin":""}),t.jsx("span",{children:_?"Refreshing...":"Refresh"})]}))]}))]})),b&&t.jsxs("button",e.__assign({className:"q-filter-btn",onClick:D},{children:[t.jsx(a.ListFilter,{size:12.5}),"Filters",y&&m>0&&t.jsx("span",e.__assign({className:"q-filter-badge"},{children:m}))]}))]})),"custom"===P&&t.jsxs("div",e.__assign({className:"q-custom-container"},{children:[t.jsx(n.default,{label:"From",value:W,minDate:null===(o=null==E?void 0:E.from)||void 0===o?void 0:o.minDate,maxDate:null!=O?O:null===(u=null==E?void 0:E.from)||void 0===u?void 0:u.maxDate,onChange:function(e){I(e),J(!1)},styles:{root:{width:"250px"}}}),t.jsx(n.default,{label:"To",value:O,minDate:null!=W?W:null===(d=null==E?void 0:E.to)||void 0===d?void 0:d.minDate,maxDate:null===(c=null==E?void 0:E.to)||void 0===c?void 0:c.maxDate,onChange:function(e){U(e),J(!1)},styles:{root:{width:"250px"}}}),t.jsx(i.Button,{className:"q-apply-btn",label:"Apply Range",disabled:!W||!O||H,onClick:function(){W&&O&&(null==g||g({preset:"custom",startDate:W,endDate:O}),J(!0))}})]}))]}))};
|
|
2
|
+
//# sourceMappingURL=DashboardDateFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardDateFilter.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});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},{});exports.DATE_PRESETS=e,exports.DATE_PRESET_MAP=a,exports.DEFAULT_DATE_PRESETS=t;
|
|
2
|
+
//# sourceMappingURL=datePreset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datePreset.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime");function l(){return s.jsxs("div",e.__assign({className:"q-skeleton","aria-busy":"true","aria-live":"polite"},{children:[s.jsxs("div",e.__assign({className:"q-skeleton-toolbar"},{children:[s.jsxs("div",e.__assign({className:"q-skeleton-presets"},{children:[s.jsx("div",{className:"q-skeleton-pill q-skeleton-pill--wide"}),s.jsx("div",{className:"q-skeleton-pill"}),s.jsx("div",{className:"q-skeleton-pill"}),s.jsx("div",{className:"q-skeleton-pill"})]})),s.jsx("div",{className:"q-skeleton-pill q-skeleton-pill--filter"})]})),s.jsxs("div",e.__assign({className:"q-skeleton-card q-skeleton-graph"},{children:[s.jsxs("div",e.__assign({className:"q-skeleton-graph-header"},{children:[s.jsxs("div",{children:[s.jsx("div",{className:"q-skeleton-line q-skeleton-line--title"}),s.jsx("div",{className:"q-skeleton-line q-skeleton-line--subtitle"})]}),s.jsx("div",{className:"q-skeleton-pill q-skeleton-pill--selector"})]})),s.jsx("div",e.__assign({className:"q-skeleton-graph-body"},{children:s.jsx("svg",e.__assign({viewBox:"0 0 400 140",className:"q-skeleton-sparkline",preserveAspectRatio:"none"},{children:s.jsx("polyline",{points:"0,110 30,90 60,100 90,60 120,80 150,40 180,70 210,50 240,85 270,55 300,95 330,65 360,90 400,70",fill:"none",className:"q-skeleton-sparkline-path"})}))}))]})),s.jsx("div",e.__assign({className:"q-skeleton-kpis"},{children:[0,1,2].map(function(l){return s.jsxs("div",e.__assign({className:"q-skeleton-card q-skeleton-kpi"},{children:[s.jsx("div",{className:"q-skeleton-line q-skeleton-line--label"}),s.jsx("div",{className:"q-skeleton-line q-skeleton-line--value"}),s.jsx("div",{className:"q-skeleton-line q-skeleton-line--sublabel"})]}),l)})}))]}))}exports.DashboardSkeleton=l,exports.default=l;
|
|
2
|
+
//# sourceMappingURL=DashboardSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardSkeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),a=require("react"),t=["Mo","Tu","We","Th","Fr","Sa","Su"],s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=function(e){var n=new Date(e);return n.setHours(0,0,0,0),n};exports.default=function(c){var i=c.value,l=c.onChange,o=c.minDate,u=c.maxDate,d=new Date,_=a.useState(null!=i?i:d),h=_[0],g=_[1],m=a.useState("day"),y=m[0],f=m[1],j=null!=i?i:d,x=a.useState(new Date(j.getFullYear(),j.getMonth(),1)),D=x[0],p=x[1],b=D.getFullYear(),v=D.getMonth(),k=16*Math.floor(b/16),N=new Date(b,v+1,0).getDate(),w=new Date(b,v,1).getDay(),S=function(e){var n=r(e);return!!(o&&n<r(o))||!!(u&&n>r(u))},M=function(e){return S(new Date(b,v,e))},C=S(d),F=0===w?6:w-1,Y=Array.from({length:F+N},function(e,n){return n<F?null:n-F+1}),A=function(e){return e===d.getDate()&&v===d.getMonth()&&b===d.getFullYear()},q=function(e){return h&&e===h.getDate()&&v===h.getMonth()&&b===h.getFullYear()};return n.jsxs("div",e.__assign({className:"date-picker"},{children:[n.jsxs("div",e.__assign({className:"date-picker__header"},{children:[n.jsx("button",e.__assign({className:"nav-btn",onClick:function(){p("day"===y?new Date(b,v-1,1):"month"===y?new Date(b-1,v,1):new Date(b-16,v,1))}},{children:"‹"})),n.jsx("span",e.__assign({className:"month-label"},{children:"year"===y?"".concat(k," – ").concat(k+15):"month"===y?b.toString():n.jsxs(n.Fragment,{children:[n.jsx("span",e.__assign({className:"month-label-click",onClick:function(){return f("month")}},{children:D.toLocaleString("default",{month:"long"})}))," ",n.jsx("span",e.__assign({className:"year-label-click",onClick:function(){return f("year")}},{children:b}))]})})),n.jsx("button",e.__assign({className:"nav-btn",onClick:function(){p("day"===y?new Date(b,v+1,1):"month"===y?new Date(b+1,v,1):new Date(b+16,v,1))}},{children:"›"}))]})),n.jsxs("div",e.__assign({className:"date-picker__top-actions"},{children:[n.jsx("div",e.__assign({className:"selected-date"},{children:h?h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Select date"})),n.jsx("button",e.__assign({className:"today-btn ".concat(C?"today-btn--disabled":""),onClick:function(){p(new Date(d.getFullYear(),d.getMonth(),1)),g(d),f("day"),null==l||l(d)},disabled:C},{children:"Today"}))]})),"month"===y&&n.jsx("div",e.__assign({className:"date-picker__month-grid"},{children:s.map(function(a,t){return n.jsx("button",e.__assign({className:"month-cell".concat(t===v?" month-cell--selected":""),onClick:function(){p(new Date(b,t,1)),f("day")}},{children:a}),a)})})),"year"===y&&n.jsx("div",e.__assign({className:"date-picker__year-grid"},{children:Array.from({length:16},function(e,n){return k+n}).map(function(a){return n.jsx("button",e.__assign({className:"year-cell".concat(a===b?" year-cell--selected":""),onClick:function(){p(new Date(a,v,1)),f("month")}},{children:a}),a)})})),"day"===y&&n.jsxs(n.Fragment,{children:[n.jsx("div",e.__assign({className:"date-picker__weekdays"},{children:t.map(function(e){return n.jsx("span",{children:e},e)})})),n.jsx("div",e.__assign({className:"date-picker__days"},{children:Y.map(function(a,t){return a?n.jsx("button",e.__assign({disabled:M(a),className:["day",A(a)&&"day--today",q(a)&&"day--selected",M(a)&&"day--disabled"].filter(Boolean).join(" "),onClick:function(){return function(e){if(!M(e)){var n=new Date(b,v,e);g(n),null==l||l(n)}}(a)}},{children:a}),t):n.jsx("span",{},t)})}))]})]}))};
|
|
2
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),a=require("lucide-react"),s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=["Mo","Tu","We","Th","Fr","Sa","Su"];function i(e){var t=new Date(e);return t.setHours(0,0,0,0),t}function o(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function l(e,t){var n=new Date(e);return n.setMonth(n.getMonth()+t),n}function c(e){return e?e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}exports.default=function(d){var u=d.value,_=d.onChange,g=d.placeholder,h=void 0===g?"Select date":g,m=d.disabled,f=void 0!==m&&m,v=d.isOpen,p=void 0!==v&&v,x=d.minDate,j=d.maxDate,y=d.className,D=d.endIcon,b=void 0!==D&&D,N=n.useRef(null),M=n.useState(p),w=M[0],F=M[1],k=n.useState("day"),S=k[0],Y=k[1],C=n.useMemo(function(){if(!u.end)return u;var e=new Date(u.end);return e.setDate(e.getDate()-1),{start:u.start,end:e}},[u.start,u.end]),T=n.useState(C.start),L=T[0],E=T[1],q=n.useState(C.end),z=q[0],A=q[1],B=n.useState(function(){var e,t,n=null!==(t=null!==(e=C.start)&&void 0!==e?e:C.end)&&void 0!==t?t:new Date;return new Date(n.getFullYear(),n.getMonth(),1)}),J=B[0],O=B[1],R=16*Math.floor(J.getFullYear()/16);n.useEffect(function(){var e;E(C.start),A(C.end);var t=null!==(e=C.start)&&void 0!==e?e:C.end;t&&O(new Date(t.getFullYear(),t.getMonth(),1))},[C.start,C.end]),n.useEffect(function(){var e=function(e){w&&N.current&&!N.current.contains(e.target)&&(F(!1),Y("day"),E(C.start),A(C.end))};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[w,C.start,C.end]);var U=n.useMemo(function(){for(var e,t=J.getFullYear(),n=J.getMonth(),a=(new Date(t,n,1).getDay()+6)%7,s=new Date(t,n+1,0).getDate(),r=[],i=0;i<a;i++)r.push({date:new Date(t,n,1-(a-i)),inMonth:!1});for(var o=1;o<=s;o++)r.push({date:new Date(t,n,o),inMonth:!0});for(var l=42-r.length,c=0;c<l;c++){var d=null===(e=r[r.length-1])||void 0===e?void 0:e.date;if(!d)break;var u=new Date(d);u.setDate(u.getDate()+1),r.push({date:u,inMonth:!1})}return r},[J]),G=function(e){var t;!L||L&&z?(E(e),A(null)):(t=L,i(e).getTime()<i(t).getTime()?(A(L),E(e)):A(e))},H=function(e,t){if(!e&&!t)return"";var n=function(e){return e.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})};return e&&!t?"".concat(n(e)," - ..."):!e&&t?"... - ".concat(n(t)):"".concat(n(e)," - ").concat(n(t)," ").concat(t.getFullYear())}(C.start,C.end);return t.jsxs("div",e.__assign({className:"drs",ref:N},{children:[!p&&t.jsxs("button",e.__assign({type:"button",className:"drs__trigger ".concat(y||""),onClick:function(){var e,t;if(!f){if(!w){var n=null!==(t=null!==(e=C.start)&&void 0!==e?e:C.end)&&void 0!==t?t:new Date;E(C.start),A(C.end),O(new Date(n.getFullYear(),n.getMonth(),1)),Y("day")}F(function(e){return!e})}},disabled:f},{children:[!b&&t.jsx(a.Calendar,{size:18,style:{color:"#6B7280"}}),t.jsx("span",e.__assign({className:"drs__label"},{children:H||h})),b&&t.jsx("span",e.__assign({style:{marginLeft:"auto"}},{children:t.jsx(a.Calendar,{size:18,style:{color:"#6B7280"}})}))]})),w&&t.jsxs("div",e.__assign({className:"drs__popover",role:"dialog","aria-label":"Date range picker"},{children:[t.jsxs("div",e.__assign({className:"drs__header"},{children:[t.jsx("button",e.__assign({type:"button",className:"drs__nav",onClick:function(){O("day"===S?function(e){return l(e,-1)}:"month"===S?function(e){return new Date(e.getFullYear()-1,e.getMonth(),1)}:function(e){return new Date(e.getFullYear()-16,e.getMonth(),1)})}},{children:t.jsx(a.ChevronLeft,{size:18})})),t.jsx("div",e.__assign({className:"drs__month"},{children:"year"===S?"".concat(R," – ").concat(R+15):"month"===S?J.getFullYear().toString():t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:"drs__month-click",onClick:function(){return Y("month")}},{children:J.toLocaleDateString("en-US",{month:"long"})}))," ",t.jsx("span",e.__assign({className:"drs__year-click",onClick:function(){return Y("year")}},{children:J.getFullYear()}))]})})),t.jsx("button",e.__assign({type:"button",className:"drs__nav",onClick:function(){O("day"===S?function(e){return l(e,1)}:"month"===S?function(e){return new Date(e.getFullYear()+1,e.getMonth(),1)}:function(e){return new Date(e.getFullYear()+16,e.getMonth(),1)})}},{children:t.jsx(a.ChevronRight,{size:18})}))]})),"day"===S&&t.jsxs("div",e.__assign({className:"drs__inputs"},{children:[t.jsx("div",e.__assign({className:"drs__input-box".concat(L?" is-active":"")},{children:L?c(L):t.jsx("span",e.__assign({className:"drs__input-placeholder"},{children:"Start date"}))})),t.jsx("span",e.__assign({className:"drs__input-sep"},{children:"–"})),t.jsx("div",e.__assign({className:"drs__input-box".concat(z?" is-active":"")},{children:z?c(z):t.jsx("span",e.__assign({className:"drs__input-placeholder"},{children:"End date"}))}))]})),"month"===S&&t.jsx("div",e.__assign({className:"drs__month-grid"},{children:s.map(function(n,a){return t.jsx("button",e.__assign({type:"button",className:"drs__month-cell".concat(J.getMonth()===a?" is-selected":""),onClick:function(){O(new Date(J.getFullYear(),a,1)),Y("day")}},{children:n}),n)})})),"year"===S&&t.jsx("div",e.__assign({className:"drs__year-grid"},{children:Array.from({length:16},function(e,t){return R+t}).map(function(n){return t.jsx("button",e.__assign({type:"button",className:"drs__year-cell".concat(J.getFullYear()===n?" is-selected":""),onClick:function(){O(new Date(n,J.getMonth(),1)),Y("month")}},{children:n}),n)})})),"day"===S&&t.jsxs(t.Fragment,{children:[t.jsx("div",e.__assign({className:"drs__week"},{children:r.map(function(n){return t.jsx("div",e.__assign({className:"drs__weekday"},{children:n}),n)})})),t.jsx("div",e.__assign({className:"drs__grid"},{children:U.map(function(n,a){var s=n.date,r=!!L&&o(s,L),l=!!z&&o(s,z),c=!(!L||!z)&&function(e,t,n){var a=i(e).getTime();return a>=Math.min(i(t).getTime(),i(n).getTime())&&a<=Math.max(i(t).getTime(),i(n).getTime())}(s,L,z),d=r||l,u=r&&!!z,_=l&&!!L,g=a%7,h=0===g,m=6===g,f=function(e,t,n){var a=i(e).getTime();return!!(t&&a<i(t).getTime())||!!(n&&a>i(n).getTime())}(s,x,j),v=["drs__day",n.inMonth?"":"is-out",c&&!d?"is-range":"",r?"is-start":"",l?"is-end":"",u?"is-range-start":"",_?"is-range-end":"",c&&h?"is-row-first":"",c&&m?"is-row-last":""].filter(Boolean).join(" ");return t.jsx("button",e.__assign({type:"button",className:"".concat(v," ").concat(f?"is-disabled":""),disabled:f,onClick:function(){f||G(s)}},{children:t.jsx("span",e.__assign({className:"drs__day-inner"},{children:s.getDate()}))}),a)})}))]}),t.jsxs("div",e.__assign({className:"drs__footer"},{children:[t.jsx("button",e.__assign({type:"button",className:"drs__btn drs__btn--ghost",onClick:function(){E(null),A(null),_({start:null,end:null}),F(!1),Y("day")}},{children:"Reset"})),t.jsx("button",e.__assign({type:"button",className:"drs__btn drs__btn--primary",disabled:!L||!z,onClick:function(){if(L&&z){var e=new Date(z);e.setDate(e.getDate()+1),_({start:L,end:e}),F(!1),Y("day")}}},{children:"Apply"}))]}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=DateRangeSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangeSelector.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),r=require("./DatePicker.js"),a=require("lucide-react");exports.default=function(s){var i,l=s.label,u=s.value,o=s.placeholder,c=void 0===o?"Select date":o,d=s.minDate,_=s.maxDate,g=s.styles,f=s.onChange,m=n.useState(!1),v=m[0],x=m[1],j=n.useState(!1),p=j[0],h=j[1],q=n.useRef(null),b=n.useRef(null);return n.useEffect(function(){var e=function(e){b.current&&!b.current.contains(e.target)&&q.current&&!q.current.contains(e.target)&&x(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),t.jsxs("div",e.__assign({className:"q-date-selector",style:null==g?void 0:g.root},{children:[l&&t.jsx("label",e.__assign({className:"q-date-selector__label"},{children:l})),t.jsxs("button",e.__assign({ref:q,type:"button",className:"q-date-selector__trigger",style:null==g?void 0:g.trigger,onClick:function(){if(!v&&q.current){var e=q.current.getBoundingClientRect(),t=window.innerHeight-e.bottom,n=e.top;h(t<320&&n>t)}x(function(e){return!e})}},{children:[t.jsx("span",{children:u?(i=u,i.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"})):c}),t.jsx(a.Calendar,{size:14,color:"#64748B"})]})),v&&t.jsx("div",e.__assign({ref:b,className:"q-date-selector__panel ".concat(p?"q-date-selector__panel--top":""),style:null==g?void 0:g.panel},{children:t.jsx(r.default,{value:u,minDate:d,maxDate:_,onChange:function(e){f(e),x(!1)}})}))]}))};
|
|
2
|
+
//# sourceMappingURL=DateSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateSelector.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react");exports.default=function(c){var t=c.options,a=c.value,i=c.onChange,l=c.placeholder,u=void 0===l?"Select":l,o=c.searchPlaceholder,d=void 0===o?"Search..":o,m=c.showSelectAll,v=void 0===m||m,h=c.selectAllLabel,_=void 0===h?"All":h,f=n.useState(!1),g=f[0],x=f[1],p=n.useState(""),j=p[0],N=p[1],b=n.useRef(null);n.useEffect(function(){var e=function(e){var s;(null===(s=b.current)||void 0===s?void 0:s.contains(e.target))||x(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var k=n.useMemo(function(){var e=j.trim().toLowerCase();return e?t.filter(function(s){return s.label.toLowerCase().includes(e)}):t},[t,j,a]),C=n.useMemo(function(){return t.map(function(e){return e.value})},[t]),w=a.length>0&&C.every(function(e){return a.includes(e)}),y=n.useMemo(function(){var e;if(0===a.length)return u;if(w)return"All";if(1===a.length){var s=t.find(function(e){return e.value===a[0]});return null!==(e=null==s?void 0:s.label)&&void 0!==e?e:"1 selected"}return"".concat(a.length," selected")},[a,w,t,u]);return s.jsxs("div",e.__assign({className:"cms-root",ref:b},{children:[s.jsxs("button",e.__assign({type:"button",className:"cms-trigger",onClick:function(){return x(function(e){return!e})}},{children:[s.jsx("span",e.__assign({className:"cms-triggerText ".concat(a.length?"cms-hasValue":"")},{children:y})),s.jsx("span",e.__assign({className:"cms-chevron"},{children:"▾"}))]})),g&&s.jsxs("div",e.__assign({className:"cms-panel"},{children:[t.length>0&&s.jsxs("div",e.__assign({className:"cms-searchRow"},{children:[s.jsx(r.Search,{size:18}),s.jsx("input",{className:"cms-searchInput",placeholder:d,value:j,onChange:function(e){return N(e.target.value)},autoFocus:!0})]})),v&&!(null==j?void 0:j.trim())&&t.length>0&&s.jsxs("div",e.__assign({className:"cms-item",onClick:function(){i(w?[]:C)}},{children:[s.jsx("span",e.__assign({className:"cms-checkbox ".concat(w?"cms-checked":"")},{children:w?"✓":""})),s.jsx("span",e.__assign({className:"cms-itemText"},{children:_}))]})),s.jsx("div",e.__assign({className:"cms-list"},{children:0===k.length?s.jsx("div",e.__assign({className:"cms-empty"},{children:"No options found"})):k.map(function(n){var r=a.includes(n.value);return s.jsxs("div",e.__assign({className:"cms-item",onClick:function(){return s=n.value,void(a.includes(s)?i(a.filter(function(e){return e!==s})):i(e.__spreadArray(e.__spreadArray([],a,!0),[s],!1)));var s}},{children:[s.jsx("span",e.__assign({className:"cms-checkbox ".concat(r?"cms-checked":"")},{children:r?"✓":""})),s.jsx("span",e.__assign({className:"cms-itemText"},{children:n.label}))]}),n.value)})}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=CustomMultiSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomMultiSelect.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),n=require("react"),a=require("lucide-react");exports.default=function(r){var t=r.options,i=r.value,c=r.onChange,u=r.placeholder,l=void 0===u?"Select":u,o=r.searchPlaceholder,d=void 0===o?"Search...":o,v=r.disabled,m=void 0!==v&&v,_=n.useState(!1),f=_[0],h=_[1],g=n.useState(""),x=g[0],p=g[1],j=n.useRef(null);n.useEffect(function(){var e=function(e){var s;(null===(s=j.current)||void 0===s?void 0:s.contains(e.target))||h(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]);var N=n.useMemo(function(){var e=x.trim().toLowerCase();return e?t.filter(function(s){return s.label.toLowerCase().includes(e)}):t},[x,t]),b=n.useMemo(function(){var e,s;return i&&null!==(s=null===(e=t.find(function(e){return e.value===i}))||void 0===e?void 0:e.label)&&void 0!==s?s:l},[i,t,l]);return s.jsxs("div",e.__assign({className:"css-root",ref:j},{children:[s.jsxs("button",e.__assign({type:"button",disabled:m,className:"css-trigger",onClick:function(){return h(function(e){return!e})}},{children:[s.jsx("span",e.__assign({className:"css-triggerText ".concat(i?"css-hasValue":"")},{children:b})),s.jsx("span",e.__assign({className:"css-chevron"},{children:"▾"}))]})),f&&s.jsxs("div",e.__assign({className:"css-panel"},{children:[s.jsxs("div",e.__assign({className:"css-searchRow"},{children:[s.jsx(a.Search,{size:18}),s.jsx("input",{className:"css-searchInput",placeholder:d,value:x,autoFocus:!0,onChange:function(e){return p(e.target.value)}})]})),s.jsx("div",e.__assign({className:"css-list"},{children:0===N.length?s.jsx("div",e.__assign({className:"css-empty"},{children:"No options found"})):N.map(function(n){return s.jsx("div",e.__assign({className:"css-item ".concat(i===(null==n?void 0:n.value)?"css-selected":""),onClick:function(){return function(e){c(e),h(!1)}(n.value)}},{children:s.jsx("span",e.__assign({className:"css-itemText"},{children:n.label}))}),n.value)})}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=CustomSingleSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomSingleSelect.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var l=require("../_virtual/_tslib.js"),e=require("react/jsx-runtime"),i=require("react"),o=require("lucide-react"),n=require("./DashboardDateFilter/DashboardDateFilter.js"),t=require("./MetricCard/MetricCard.js"),d=require("./FiltersSidebar/FiltersSidebar.js"),a=require("./Graph/Graph.js"),u=require("./Graph/GraphEmptyState.js"),r=require("./DashboardDateFilter/datePreset.js"),s=require("./Table/TableCard.js"),v=require("./Table/TableGrid/TableGrid.js"),c=require("../utils/tableColumns.js"),p=require("../utils/sectionOrder.js"),g=require("../utils/index.js"),h=require("../utils/kpiIcon.js");function b(l){return l&&"object"==typeof l&&"default"in l?l:{default:l}}var f=b(i),y=["#7c3aed","#FFC130","#F43F5E","#10b981","#3b82f6"];function m(b){var m,x,j,C,F,_,k,D,w,B,S,L,q,A,O,M,P,T,E,R,V,K,H,I,G,z,W,N,Z,J,Q,U,X,Y,$,ll,el,il=b.uiConfig,ol=b.data,nl=b.dataLoading,tl=b.startDate,dl=b.endDate,al=b.onDateChange,ul=b.onRefresh,rl=b.selectedKpis,sl=b.onKpiChange,vl=b.sidebarVisible,cl=b.onSidebarShow,pl=b.onSidebarHide,gl=b.filterValues,hl=b.onFilterChange,bl=b.onFilterReset,fl=b.onFilterApply,yl=b.appliedFilters,ml=b.graphEmptyState,xl=b.tables,jl=b.tableLayout,Cl=b.sectionOrder,Fl=b.hiddenSections,_l=b.tablePages,kl=b.onTableExpand,Dl=b.onTableLoadMore,wl=null!==(j=null===(x=null===(m=null==il?void 0:il.data)||void 0===m?void 0:m.dateFilters)||void 0===x?void 0:x.datepresets)&&void 0!==j?j:[],Bl=i.useMemo(function(){return wl.map(function(l){return r.DATE_PRESET_MAP[l]}).filter(Boolean)},[JSON.stringify(wl)]),Sl=i.useMemo(function(){return g.getActiveFilterCount(yl)},[yl]),Ll=i.useMemo(function(){var l,e,i=null==jl?void 0:jl.spans;if(i)return(null!==(e=null===(l=null==il?void 0:il.data)||void 0===l?void 0:l.tableBuilder)&&void 0!==e?e:[]).map(function(l,e){return Array.isArray(i)?i[e]:i[l.key]})},[null==jl?void 0:jl.spans,null===(C=null==il?void 0:il.data)||void 0===C?void 0:C.tableBuilder]),ql=e.jsx("div",l.__assign({style:{padding:"4px"}},{children:e.jsx(a.default,{loading:nl,emptyState:null!=ml?ml:e.jsx(u.default,{}),title:null===(F=null==il?void 0:il.data)||void 0===F?void 0:F.graphBuilder.title,description:null===(k=null===(_=null==il?void 0:il.data)||void 0===_?void 0:_.graphBuilder)||void 0===k?void 0:k.subtitle,icon:e.jsx(o.ChartLine,{size:18}),xAxis:{label:(null===(w=null===(D=null==il?void 0:il.data)||void 0===D?void 0:D.graphBuilder)||void 0===w?void 0:w.axis.xAxisLabel)||"Date"},style:{chartHeight:220},panes:null===(B=null==il?void 0:il.data)||void 0===B?void 0:B.graphBuilder.tiers.map(function(l,i){var n,t,d,a,u,r,s,v,c,p,g,h=rl[l.key]||(null===(n=l.plotOptions[0])||void 0===n?void 0:n.key),b=ol.graph.tier.find(function(e){return e.key===l.key}),f=(null===(t=null==b?void 0:b.plotbyoptions)||void 0===t?void 0:t[h])||{},m=(null==l?void 0:l.series)||[],x=Object.keys(f),j=l.plotOptions.find(function(l){return l.value===h});return{key:l.key,selector:{label:"Plot By",value:h,onChange:function(e){sl(l.key,e)},options:l.plotOptions.map(function(l){return{label:l.label,value:l.value}}),triggerIcon:e.jsx(o.ChartLine,{size:16,color:0===i?"green":"purple"})},yAxis:{label:null==j?void 0:j.yAxisLabel,beginAtZero:"false"!==(null==h?void 0:h.yAxisBeginAtZero)},tooltip:{formatHeading:function(l){return"".concat(l)}},legend:{position:(null===(u=null===(a=null===(d=null==il?void 0:il.data)||void 0===d?void 0:d.graphBuilder)||void 0===a?void 0:a.legend)||void 0===u?void 0:u.position)||"bottom",toggle:"yes"===(null===(v=null===(s=null===(r=null==il?void 0:il.data)||void 0===r?void 0:r.graphBuilder)||void 0===s?void 0:s.legend)||void 0===v?void 0:v.allowToggle),align:(null===(g=null===(p=null===(c=null==il?void 0:il.data)||void 0===c?void 0:c.graphBuilder)||void 0===p?void 0:p.legend)||void 0===g?void 0:g.alignment)||"center"},height:0===i?300:250,series:x.map(function(l,e){var i,o,n,t,d,a=(null===(o=null===(i=null==b?void 0:b.plotbyoptions)||void 0===i?void 0:i[h])||void 0===o?void 0:o[l])||[],u=y[e%y.length],r=m.find(function(e){return e.key===l});return{key:l,label:(null==r?void 0:r.name)||l,data:a,area:"yes"===(null==r?void 0:r.areaFill),curve:(null==r?void 0:r.curveType)||"linear",color:"#".concat(null==r?void 0:r.color)||u,dashed:"dashed"===(null==r?void 0:r.style),strokeWidth:parseInt(null==r?void 0:r.strokeWidth)||2,showPoints:"yes"===(null==r?void 0:r.showPoints),pointRadius:parseInt(null==r?void 0:r.pointRadius)||3,showInLegend:"yes"===(null===(d=null===(t=null===(n=null==il?void 0:il.data)||void 0===n?void 0:n.graphBuilder)||void 0===t?void 0:t.legend)||void 0===d?void 0:d.showLegends),valueFormatter:function(l){return"".concat(l)}}})}})})})),Al=e.jsx("div",l.__assign({style:{padding:"4px",display:"flex",gap:"10px",flexWrap:"wrap"}},{children:l.__spreadArray([],null!==(L=null===(S=null==il?void 0:il.data)||void 0===S?void 0:S.kpiCards)&&void 0!==L?L:[],!0).sort(function(l,e){var i,o;return(null!==(i=l.displayOrder)&&void 0!==i?i:0)-(null!==(o=e.displayOrder)&&void 0!==o?o:0)}).map(function(l){var i,o=null===(i=null==ol?void 0:ol.kpiCards)||void 0===i?void 0:i[l.title],n=g.isKpiValueObject(o)?g.getKpiValueColor(o.currentValue,o.baselineValue,l.indicatorLogic):void 0,d=g.isKpiValueObject(o)?g.getKpiDelta(o.currentValue,o.baselineValue,l.indicatorLogic):void 0;return e.jsx(t.default,{title:l.title,subtitle:l.subtitle,value:g.formatKpiValue(o,l.valueFormat),valueColor:n,delta:d&&{label:d.label,direction:d.direction,color:n},icon:h.getKpiIcon(l.icon),loading:nl},l.title)})})),Ol=(null!==(O=null===(A=null===(q=null==il?void 0:il.data)||void 0===q?void 0:q.tableBuilder)||void 0===A?void 0:A.length)&&void 0!==O?O:0)>0?e.jsx("div",l.__assign({style:{padding:"4px"}},{children:e.jsx(v.default,l.__assign({itemSpans:Ll,totalColumns:null!==(M=null==jl?void 0:jl.totalColumns)&&void 0!==M?M:12,defaultSpan:null==jl?void 0:jl.defaultSpan,options:null!==(P=null==jl?void 0:jl.options)&&void 0!==P?P:[1,2,3],defaultColumns:null==jl?void 0:jl.defaultColumns,columns:null==jl?void 0:jl.columns,onColumnsChange:null==jl?void 0:jl.onColumnsChange,showToggle:(null===(T=null==jl?void 0:jl.showToggle)||void 0===T||T)&&(null!==(V=null===(R=null===(E=null==il?void 0:il.data)||void 0===E?void 0:E.tableBuilder)||void 0===R?void 0:R.length)&&void 0!==V?V:0)>1,toggleLabel:null==jl?void 0:jl.toggleLabel,minColumnWidth:null!==(K=null==jl?void 0:jl.minColumnWidth)&&void 0!==K?K:380,gap:null!==(H=null==jl?void 0:jl.gap)&&void 0!==H?H:12,equalHeights:null===(I=null==jl?void 0:jl.equalHeights)||void 0===I||I},{children:il.data.tableBuilder.map(function(i){var o,n,t=null!==(n=null===(o=null==ol?void 0:ol.table)||void 0===o?void 0:o[i.key])&&void 0!==n?n:[],d=null==_l?void 0:_l[i.key],a=!!(null==d?void 0:d.loaded),u=a?d.rows:t,r=!a&&i.rowLimit&&i.rowLimit>0?t.slice(0,i.rowLimit):u,v=null==xl?void 0:xl[i.key],p=c.buildColumns(i,v),g=null==v?void 0:v.card,b=null==g?void 0:g.icon,y=h.getKpiIcon(i.icon),m=y&&f.default.isValidElement(y)?f.default.cloneElement(y,l.__assign(l.__assign({},null!=(null==b?void 0:b.size)?{size:b.size}:{}),(null==b?void 0:b.color)?{color:b.color}:{})):y,x=b?l.__assign(l.__assign(l.__assign({width:"auto",height:"auto"},b.color?{color:b.color}:{}),b.background?{background:b.background,padding:6,borderRadius:8}:{}),b.style):void 0;return e.jsx(s.default,{title:i.title,icon:m,styles:{root:null==g?void 0:g.root,header:null==g?void 0:g.header,title:null==g?void 0:g.title,icon:x},onExpand:function(l){return null==kl?void 0:kl(i.key,l)},table:{rows:c.withRowIds(r),columns:p,loading:nl,loadingMore:null==d?void 0:d.loading,hasMore:null==d?void 0:d.hasMore,onLoadMore:d?function(){return null==Dl?void 0:Dl(i.key)}:void 0,tableProps:null==v?void 0:v.tableProps}},i.key)})}))})):null,Ml={graphBuilder:ql,kpiCards:Al,tableBuilder:Ol},Pl=p.resolveSectionOrder(Cl,Fl,null===(G=null==il?void 0:il.data)||void 0===G?void 0:G.sectionOrder,Object.keys(Ml)),Tl=p.isSectionHidden(Fl,"dateFilters"),El=p.isSectionHidden(Fl,"sidebarFilters");return e.jsx(e.Fragment,{children:e.jsxs("div",l.__assign({style:{display:"flex",flexDirection:"column",gap:12}},{children:[!Tl&&e.jsx("div",l.__assign({style:{padding:"4px"}},{children:e.jsx(n.default,{filterCount:Sl,initialStartDate:tl,initialEndDate:dl,onDateChange:al,onRefresh:ul,onFilterClick:cl,presets:Bl,datePickerProps:{from:{minDate:new Date(2025,0,1),maxDate:new Date},to:{minDate:tl,maxDate:new Date}},defaultPresets:null===(z=null==il?void 0:il.data)||void 0===z?void 0:z.dateFilters.defaultPreset,showLiveButton:"yes"===(null===(N=null===(W=null==il?void 0:il.data)||void 0===W?void 0:W.dateFilters)||void 0===N?void 0:N.showLiveButton),showFilterButton:!El&&"yes"===(null===(J=null===(Z=null==il?void 0:il.data)||void 0===Z?void 0:Z.dateFilters)||void 0===J?void 0:J.showFilterButton),showFilterCount:!El&&"yes"===(null===(U=null===(Q=null==il?void 0:il.data)||void 0===Q?void 0:Q.dateFilters)||void 0===U?void 0:U.showFilterCount),liveDuration:null===(Y=null===(X=null==il?void 0:il.data)||void 0===X?void 0:X.dateFilters)||void 0===Y?void 0:Y.liveDurationMs})})),Pl.map(function(l){return e.jsx(f.default.Fragment,{children:Ml[l]},l)}),!El&&e.jsx(d.default,{visible:vl,onHide:pl,onReset:bl,onApply:fl,fields:null!==(el=null===(ll=null===($=null==il?void 0:il.data)||void 0===$?void 0:$.sidebarFilters)||void 0===ll?void 0:ll.map(function(l){var e,i,o,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!==(i=null===(e=l.options)||void 0===e?void 0:e.map(function(l){return{label:l,value:l}}))&&void 0!==i?i:[];return{id:t,label:l.label,hint:l.description,type:d,placeholder:l.placeholder,options:a,value:"multiSelect"===d?null!==(o=gl[t])&&void 0!==o?o:[]:null!==(n=gl[t])&&void 0!==n?n:"",onChange:function(l){return hl(t,l)}}}))&&void 0!==el?el:[]})]}))})}exports.ExecutiveDashboard=m,exports.default=m;
|
|
2
|
+
//# sourceMappingURL=ExecutiveDashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutiveDashboard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),a=require("react/jsx-runtime"),r=require("lucide-react");exports.default=function(c){var i=c.value,n=c.placeholder,t=c.disabled,s=c.onChange,l=c.className,u=c.searchIcon,o=void 0!==u&&u;return a.jsxs("div",e.__assign({className:"cti-wrapper"},{children:[o&&a.jsx(r.Search,{size:15,className:"cti-search-icon"}),a.jsx("input",{className:"\n cti-input\n ".concat(o?"cti-input--with-icon":"","\n ").concat(null!=l?l:"","\n "),value:null!=i?i:"",disabled:t,placeholder:n,onChange:function(e){return s(e.target.value)}})]}))};
|
|
2
|
+
//# sourceMappingURL=CustomTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTextInput.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),l=require("react/jsx-runtime"),i=require("primereact/sidebar"),s=require("primereact/button");require("primereact/resources/themes/lara-light-indigo/theme.css"),require("primereact/resources/primereact.min.css"),require("primeicons/primeicons.css");var n=require("../DatePickers/DateRangeSelector.js"),a=require("../DropDowns/CustomMultiSelect.js"),t=require("../DatePickers/DateSelector.js"),o=require("./CustomTextInput.js"),r=require("../DropDowns/CustomSingleSelect.js");exports.default=function(d){var u=d.visible,c=d.onHide,v=d.fields,g=void 0===v?[]:v,p=d.onReset,h=d.onApply,m=d.title;return l.jsxs(i.Sidebar,e.__assign({visible:u,position:"right",onHide:c,dismissable:!1,showCloseIcon:!0,modal:!0,className:"log-filterSidebar",header:l.jsx("div",e.__assign({className:"log-filterTitle"},{children:null!=m?m:"Filter By"}))},{children:[l.jsx("div",e.__assign({className:"log-filterBody"},{children:null==g?void 0:g.map(function(i){var s,d,u;return l.jsxs("div",e.__assign({className:"log-filterBlock"},{children:[l.jsx("div",e.__assign({className:"log-filterLabel"},{children:i.label})),i.hint&&l.jsx("div",e.__assign({className:"log-filterHint"},{children:i.hint})),l.jsx("div",e.__assign({style:{marginTop:"12px"}},{children:(null==i?void 0:i.loading)?l.jsx("div",e.__assign({className:"log-filterEmpty"},{children:"Loading..."})):l.jsxs(l.Fragment,{children:["text"===i.type&&l.jsx(o.default,{value:null==i?void 0:i.value,placeholder:(null==i?void 0:i.placeholder)||"Enter the value..",disabled:null==i?void 0:i.disabled,onChange:null==i?void 0:i.onChange}),"singleSelect"===i.type&&l.jsx(r.default,{value:null==i?void 0:i.value,options:null!==(s=null==i?void 0:i.options)&&void 0!==s?s:[],placeholder:null==i?void 0:i.placeholder,disabled:null==i?void 0:i.disabled,onChange:null==i?void 0:i.onChange}),"multiSelect"===i.type&&l.jsx(a.default,{options:null!==(d=null==i?void 0:i.options)&&void 0!==d?d:[],value:null!==(u=null==i?void 0:i.value)&&void 0!==u?u:[],onChange:null==i?void 0:i.onChange,selectAllLabel:null==i?void 0:i.selectAllLabel}),"date"===i.type&&l.jsx(t.default,{value:null==i?void 0:i.value,onChange:null==i?void 0:i.onChange,styles:{root:{padding:0},trigger:{height:"40px"}}}),"dateRange"===i.type&&l.jsx(n.default,{value:null==i?void 0:i.value,onChange:null==i?void 0:i.onChange,endIcon:!0})]})}))]}),i.id)})})),l.jsxs("div",e.__assign({className:"log-filterFooter"},{children:[l.jsx(s.Button,{label:"Reset Filter",className:"p-button-outlined log-btnReset",onClick:p}),l.jsx(s.Button,{label:"Apply Filter",className:"log-btnApply",onClick:h})]}))]}))};
|
|
2
|
+
//# sourceMappingURL=FiltersSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FiltersSidebar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),l=require("./LineChart.js"),i=require("./GraphSkeleton.js"),r=require("./PlotBySelector.js"),t=require("./types.js");function a(e){var l,i,t,a=e.config,o=void 0!==a.value,d=s.useState(null!==(l=a.defaultValue)&&void 0!==l?l:null===(t=null===(i=a.options)||void 0===i?void 0:i[0])||void 0===t?void 0:t.value),c=d[0],u=d[1],h=o?a.value:c;return n.jsx(r.default,{config:a,value:h,onChange:function(e){var n;o||u(e),null===(n=a.onChange)||void 0===n||n.call(a,e)}})}function o(s){var i,r=s.pane,t=s.xAxis,a=s.sharedStyle,o=s.isLast,d=s.hiddenKeys,c=s.toggleSeries,u=s.syncId,h=s.onPointClick,_=o?t:e.__assign(e.__assign({},t),{show:!1,label:void 0});return n.jsxs("div",e.__assign({className:"ellm-graph__pane"},{children:[r.title&&n.jsx("div",e.__assign({className:"ellm-graph__pane-title"},{children:r.title})),n.jsx(l.default,{series:r.series,hiddenKeys:d,onToggleSeries:c,xAxis:_,yAxis:r.yAxis,tooltip:r.tooltip,legend:{show:!1},syncId:u,style:e.__assign(e.__assign({},a),{chartHeight:null!==(i=r.height)&&void 0!==i?i:null==a?void 0:a.chartHeight}),onPointClick:h})]}))}exports.default=function(r){var d,c=r.series,u=r.panes,h=r.title,_=r.description,g=r.icon,v=r.plotBy,f=r.xAxis,m=r.yAxis,p=r.tooltip,x=r.legend,y=r.config,j=r.style,k=r.emptyState,N=r.loading,A=r.onPointClick,S=!!(null==u?void 0:u.length),b=s.useId(),w=s.useState(function(){var e=new Set;return(null!=c?c:[]).forEach(function(n){return n.hidden&&e.add(n.key)}),(null!=u?u:[]).forEach(function(n){return n.series.forEach(function(n){return n.hidden&&e.add(n.key)})}),e}),C=w[0],q=w[1],P=function(e){return q(function(n){var s=new Set(n);return s.has(e)?s.delete(e):s.add(e),s})},I=!1!==(null==y?void 0:y.showHeader),E=s.useMemo(function(){return S?u.some(function(e){return e.series.some(function(e){return e.data.some(function(e){return null!=e.y})})}):(null!=c?c:[]).some(function(e){return e.data.some(function(e){return null!=e.y})})},[S,u,c]),L=s.useMemo(function(){var n;if(!S)return j;var s=null!==(n=null==j?void 0:j.yAxisWidth)&&void 0!==n?n:u.some(function(e){var n;return null===(n=e.yAxis)||void 0===n?void 0:n.label})?64:48;return e.__assign(e.__assign({},j),{yAxisWidth:s})},[S,u,j]),M=s.useMemo(function(){if(!S)return[];var e=[];return u.forEach(function(n){var s;!1!==(null===(s=n.legend)||void 0===s?void 0:s.show)&&n.series.forEach(function(n,s){var l;!1!==n.showInLegend&&e.push({key:n.key,label:n.label,color:null!==(l=n.color)&&void 0!==l?l:t.colorForIndex(null==L?void 0:L.colors,s)})})}),e},[S,u,null==L?void 0:L.colors]),H=S&&M.length>0,K=e.__spreadArray(e.__spreadArray([],v?[v]:[],!0),S?u.flatMap(function(e){return e.selector?[e.selector]:[]}):[],!0),W=h||_||g||K.length>0;return n.jsxs("div",e.__assign({className:"ellm-graph".concat((null==j?void 0:j.className)?" ".concat(j.className):""),style:null==j?void 0:j.container},{children:[I&&W&&n.jsxs("div",e.__assign({className:"ellm-graph__header"},{children:[n.jsxs("div",e.__assign({className:"ellm-graph__heading"},{children:[g&&n.jsx("span",e.__assign({className:"ellm-graph__icon"},{children:g})),n.jsxs("div",{children:[h&&n.jsx("div",e.__assign({className:"ellm-graph__title"},{children:h})),_&&n.jsx("div",e.__assign({className:"ellm-graph__description"},{children:_}))]})]})),K.length>0&&n.jsx("div",e.__assign({className:"ellm-graph__controls"},{children:K.map(function(e,s){return n.jsx(a,{config:e},s)})}))]})),N?n.jsx(i.default,{height:null==j?void 0:j.chartHeight}):!E&&k?n.jsx("div",e.__assign({className:"ellm-graph__empty"},{children:k})):S?n.jsxs(n.Fragment,{children:[n.jsx("div",e.__assign({className:"ellm-graph__panes",style:{gap:null!==(d=null==j?void 0:j.paneGap)&&void 0!==d?d:12}},{children:u.map(function(e,s){var l;return n.jsx(o,{pane:e,xAxis:f,sharedStyle:L,isLast:s===u.length-1,hiddenKeys:C,toggleSeries:P,syncId:b,onPointClick:A},null!==(l=e.key)&&void 0!==l?l:"pane-".concat(s))})})),H&&n.jsx("div",e.__assign({className:"ellm-graph__legend"},{children:M.map(function(s){var l=C.has(s.key);return n.jsxs("button",e.__assign({type:"button",className:"ellm-graph__legend-item".concat(l?" ellm-graph__legend-item--off":""),onClick:function(){return P(s.key)}},{children:[n.jsxs("svg",e.__assign({className:"ellm-graph__legend-marker",width:"28",height:"12",viewBox:"0 0 28 12","aria-hidden":"true"},{children:[n.jsx("line",{x1:"1",y1:"6",x2:"27",y2:"6",stroke:s.color,strokeWidth:"2.5",strokeLinecap:"round"}),n.jsx("circle",{cx:"14",cy:"6",r:"4",fill:"#fff",stroke:s.color,strokeWidth:"2.5"})]})),s.label]}),s.key)})}))]}):n.jsx(l.default,{series:null!=c?c:[],hiddenKeys:C,onToggleSeries:P,xAxis:f,yAxis:m,tooltip:p,legend:x,style:j,onPointClick:A})]}))};
|
|
2
|
+
//# sourceMappingURL=Graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Graph.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),r=require("lucide-react");exports.default=function(a){var i=a.title,t=void 0===i?"No data to display":i,l=a.description,d=void 0===l?"There's no data for the selected date range and filters. Try adjusting your filters or picking a different range.":l;return s.jsxs("div",e.__assign({className:"ellm-graph__empty-default"},{children:[s.jsx("span",e.__assign({className:"ellm-graph__empty-icon"},{children:s.jsx(r.LineChart,{size:22})})),s.jsx("div",e.__assign({className:"ellm-graph__empty-title"},{children:t})),s.jsx("div",e.__assign({className:"ellm-graph__empty-desc"},{children:d}))]}))};
|
|
2
|
+
//# sourceMappingURL=GraphEmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEmptyState.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),s=require("react/jsx-runtime"),l=require("react");exports.default=function(a){var r=a.height,i=void 0===r?300:r,n=l.useId();return s.jsxs("div",e.__assign({className:"ellm-graph__skeleton","aria-busy":"true","aria-live":"polite",style:{height:i}},{children:[s.jsx("div",e.__assign({className:"ellm-graph__skeleton-yaxis"},{children:[0,1,2,3,4].map(function(e){return s.jsx("span",{className:"ellm-graph__skeleton-tick ellm-graph__shimmer"},e)})})),s.jsxs("div",e.__assign({className:"ellm-graph__skeleton-plot"},{children:[s.jsx("div",e.__assign({className:"ellm-graph__skeleton-grid"},{children:[0,1,2,3,4].map(function(e){return s.jsx("span",{className:"ellm-graph__skeleton-gridline"},e)})})),s.jsxs("svg",e.__assign({className:"ellm-graph__skeleton-svg",viewBox:"0 0 400 120",preserveAspectRatio:"none"},{children:[s.jsx("defs",{children:s.jsxs("linearGradient",e.__assign({id:n,x1:"0",y1:"0",x2:"0",y2:"1"},{children:[s.jsx("stop",{offset:"0%",className:"ellm-graph__skeleton-area-top"}),s.jsx("stop",{offset:"100%",className:"ellm-graph__skeleton-area-bottom"})]}))}),s.jsx("path",{d:"M0,120 L0,92 30,78 60,86 90,52 120,66 150,34 180,58 210,42 240,72 270,46 300,80 330,54 360,74 400,58 L400,120 Z",fill:"url(#".concat(n,")")}),s.jsx("polyline",{points:"0,92 30,78 60,86 90,52 120,66 150,34 180,58 210,42 240,72 270,46 300,80 330,54 360,74 400,58",fill:"none",className:"ellm-graph__skeleton-line"})]})),s.jsx("div",e.__assign({className:"ellm-graph__skeleton-xaxis"},{children:[0,1,2,3,4,5].map(function(e){return s.jsx("span",{className:"ellm-graph__skeleton-tick ellm-graph__shimmer"},e)})}))]}))]}))};
|
|
2
|
+
//# sourceMappingURL=GraphSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphSkeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("react"),o=require("recharts"),l=require("../ui/chart.js"),t=require("./types.js"),r=require("../../utils/index.js"),a=function(e){return"number"==typeof e&&!Number.isNaN(e)},u=function(e){switch(e){case"linear":return"linear";case"step":return"stepAfter";default:return"monotone"}};exports.default=function(d){var s,v,c,f,y,h,m,p=d.series,g=d.hiddenKeys,x=d.onToggleSeries,k=d.xAxis,b=d.yAxis,C=d.tooltip,_=d.legend,j=d.style,A=d.syncId,w=d.onPointClick,L=null!==(s=null==j?void 0:j.chartHeight)&&void 0!==s?s:300,T=null!==(v=null==j?void 0:j.gridColor)&&void 0!==v?v:"#eef0f4",S=null!==(c=null==j?void 0:j.axisColor)&&void 0!==c?c:"#d7dbe3",F=null!==(f=null==j?void 0:j.axisLabelColor)&&void 0!==f?f:"#6b7280",K=null!==(y=null==j?void 0:j.tickColor)&&void 0!==y?y:"#9ca3af",M=null!==(h=null==j?void 0:j.fontFamily)&&void 0!==h?h:"Inter, system-ui, -apple-system, sans-serif",q=n.useMemo(function(){var i,n,o;if(null===(i=null==k?void 0:k.categories)||void 0===i?void 0:i.length)return{categories:k.categories,xType:null!==(n=k.type)&&void 0!==n?n:"category"};var l=new Set,t=[];p.forEach(function(e){return e.data.forEach(function(e){l.has(e.x)||(l.add(e.x),t.push(e.x))})});var r=t.every(a),u=null!==(o=null==k?void 0:k.type)&&void 0!==o?o:r?"number":"category";return{categories:"number"===u?e.__spreadArray([],t,!0).sort(function(e,i){return Number(e)-Number(i)}):t,xType:u}},[p,null==k?void 0:k.categories,null==k?void 0:k.type]),E=q.categories,N=q.xType,W=n.useMemo(function(){var e=new Map;return p.forEach(function(i){var n=new Map;i.data.forEach(function(e){return n.set(e.x,e.y)}),e.set(i.key,n)}),E.map(function(i){var n={x:i};return p.forEach(function(o){var l,t=null===(l=e.get(o.key))||void 0===l?void 0:l.get(i);n[o.key]=null==t?null:t}),n})},[p,E]),I=n.useMemo(function(){var e={},i=p.map(function(i,n){var o,l=null!==(o=i.color)&&void 0!==o?o:t.colorForIndex(null==j?void 0:j.colors,n);return e[i.key]={label:i.label,color:l},{series:i,color:l,index:n}});return{chartConfig:e,resolved:i}},[p,null==j?void 0:j.colors]),z=I.chartConfig,G=I.resolved,H=n.useMemo(function(){var e={};return p.forEach(function(i){i.valueFormatter&&(e[i.key]=function(e,n){var o;return i.valueFormatter(e,null!==(o=null==n?void 0:n.payload)&&void 0!==o?o:{x:null==n?void 0:n.x,y:e})})}),e},[p]),D=!1!==(null==C?void 0:C.enabled),O=(null==C?void 0:C.seriesKeys)?new Set(C.seriesKeys):null,P=!1!==(null==_?void 0:_.show),R="top"===(null==_?void 0:_.position)?"top":"bottom",B="start"===(null==_?void 0:_.align)?"left":"end"===(null==_?void 0:_.align)?"right":"center",V=!1!==(null==k?void 0:k.show),X=!1!==(null==b?void 0:b.show),Y=!1!==(null==j?void 0:j.showGrid),Z=!!(null==j?void 0:j.showVerticalGrid),J=[null!=(null==b?void 0:b.min)?b.min:!1!==(null==b?void 0:b.beginAtZero)?0:"auto",null!=(null==b?void 0:b.max)?b.max:"auto"],Q=null!==(m=null==j?void 0:j.yAxisWidth)&&void 0!==m?m:(null==b?void 0:b.label)?64:48,U={top:12,right:16,bottom:8,left:null!=(null==j?void 0:j.yAxisWidth)?0:(null==b?void 0:b.label)?16:0};return i.jsx(l.ChartContainer,e.__assign({config:z,style:{height:L,fontFamily:M}},{children:i.jsxs(o.ComposedChart,e.__assign({data:W,margin:U,syncId:A},{children:[i.jsx(o.CartesianGrid,{vertical:Z,horizontal:Y,stroke:T}),i.jsx(o.XAxis,{dataKey:"x",type:"number"===N?"number":"category",hide:!V,height:(null==k?void 0:k.label)?52:void 0,tickLine:!1,axisLine:!(null==k?void 0:k.hideLine)&&{stroke:S},tickMargin:8,minTickGap:24,interval:"preserveStartEnd",tick:{fill:K,fontSize:11},tickFormatter:(null==k?void 0:k.formatTick)?function(e,i){return k.formatTick(e,i)}:void 0,label:(null==k?void 0:k.label)?{value:k.label,position:"insideBottom",offset:4,fill:F,fontSize:12,fontWeight:500}:void 0}),i.jsx(o.YAxis,{hide:!X,domain:J,tickLine:!1,axisLine:!1===(null==b?void 0:b.hideLine)&&{stroke:S},tickCount:null==b?void 0:b.tickCount,width:Q,tick:{fill:K,fontSize:11},tickFormatter:(null==b?void 0:b.formatTick)?function(e,i){return b.formatTick(e,i)}:function(e){return"number"==typeof e?r.compactNumber(e):String(e)},label:(null==b?void 0:b.label)?{value:b.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"},fill:F,fontSize:12,fontWeight:500}:void 0}),D&&i.jsx(l.ChartTooltip,{cursor:{stroke:S,strokeDasharray:"4 4"},content:function(n){var o,t=(null!==(o=n.payload)&&void 0!==o?o:[]).filter(function(e){var i=p.find(function(i){return i.key===e.dataKey});return!1!==(null==i?void 0:i.showInTooltip)&&!(O&&!O.has(String(e.dataKey)))});return(null==C?void 0:C.render)?C.render({x:n.label,points:t.map(function(e){var i;return{series:p.find(function(i){return i.key===e.dataKey}),value:null!==(i=e.value)&&void 0!==i?i:null,point:{x:n.label,y:e.value},color:e.color}})}):i.jsx(l.ChartTooltipContent,e.__assign({},n,{payload:t,hideLabel:!1===(null==C?void 0:C.showHeading),valueFormatters:H,labelFormatter:(null==C?void 0:C.formatHeading)?function(e){return C.formatHeading(e)}:void 0}))}}),P&&i.jsx(l.ChartLegend,{verticalAlign:R,content:function(n){return i.jsx(l.ChartLegendContent,e.__assign({},n,{verticalAlign:R,align:B,hiddenKeys:g,onItemClick:!1!==(null==_?void 0:_.toggle)&&x?x:void 0}))}}),G.map(function(n){var l,t,r,a,d=n.series,s=g.has(d.key),v="var(--color-".concat(d.key,")"),c=!0===d.dashed?"6 5":"string"==typeof d.dashed?d.dashed:void 0,f=!1!==d.showPoints&&{r:null!==(l=d.pointRadius)&&void 0!==l?l:3,fill:"#fff",stroke:v,strokeWidth:2},y={r:(null!==(t=d.pointRadius)&&void 0!==t?t:3)+2,onClick:w?function(e,i){var n,o;return function(e,i,n){if(w){var o=p.find(function(i){return i.key===e});o&&w({series:o,point:{x:null==i?void 0:i.x,y:null==i?void 0:i[e]},index:n})}}(d.key,null!==(n=null==i?void 0:i.payload)&&void 0!==n?n:i,null!==(o=null==i?void 0:i.index)&&void 0!==o?o:0)}:void 0},h={key:d.key,dataKey:d.key,name:d.key,type:u(d.curve),stroke:v,strokeWidth:null!==(r=d.strokeWidth)&&void 0!==r?r:2,strokeDasharray:c,connectNulls:!1,isAnimationActive:!1,hide:s,dot:f,activeDot:y};return d.area?i.jsx(o.Area,e.__assign({},h,{fill:v,fillOpacity:null!==(a=d.areaOpacity)&&void 0!==a?a:.12})):i.jsx(o.Line,e.__assign({},h))})]}))}))};
|
|
2
|
+
//# sourceMappingURL=LineChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|