@msqd/lydia 0.0.0-stage → 0.6.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/LICENSE +373 -0
- package/README.md +151 -2
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/Components/Badges/Badge.d.ts +20 -0
- package/dist/Components/Badges/Badge.js +33 -0
- package/dist/Components/Badges/index.d.ts +1 -0
- package/dist/Components/Badges/index.js +4 -0
- package/dist/Components/Buttons/Button.d.ts +8 -0
- package/dist/Components/Buttons/Button.js +30 -0
- package/dist/Components/Buttons/ButtonGroup.d.ts +13 -0
- package/dist/Components/Buttons/ButtonGroup.js +61 -0
- package/dist/Components/Buttons/index.d.ts +2 -0
- package/dist/Components/Buttons/index.js +6 -0
- package/dist/Components/Cards/Card.d.ts +38 -0
- package/dist/Components/Cards/Card.js +31 -0
- package/dist/Components/Cards/StatCard.d.ts +14 -0
- package/dist/Components/Cards/StatCard.js +27 -0
- package/dist/Components/Cards/index.d.ts +2 -0
- package/dist/Components/Cards/index.js +7 -0
- package/dist/Components/Charts/Components/ThinBarChart.d.ts +35 -0
- package/dist/Components/Charts/Components/ThinBarChart.js +41 -0
- package/dist/Components/Charts/Components/WideBarChart.d.ts +48 -0
- package/dist/Components/Charts/Components/WideBarChart.js +50 -0
- package/dist/Components/Charts/Components/index.d.ts +2 -0
- package/dist/Components/Charts/Components/index.js +6 -0
- package/dist/Components/Charts/Hooks/index.d.ts +2 -0
- package/dist/Components/Charts/Hooks/index.js +7 -0
- package/dist/Components/Charts/Hooks/useChartDimensions.d.ts +24 -0
- package/dist/Components/Charts/Hooks/useChartDimensions.js +42 -0
- package/dist/Components/Charts/Hooks/useThemeColors.d.ts +10 -0
- package/dist/Components/Charts/Hooks/useThemeColors.js +51 -0
- package/dist/Components/Charts/SummaryPerformancesChart.d.ts +7 -0
- package/dist/Components/Charts/SummaryPerformancesChart.js +93 -0
- package/dist/Components/Charts/SummaryRateChart.d.ts +9 -0
- package/dist/Components/Charts/SummaryRateChart.js +81 -0
- package/dist/Components/Charts/TransactionsChart.d.ts +6 -0
- package/dist/Components/Charts/TransactionsChart.js +70 -0
- package/dist/Components/Charts/Utils/ChartBarCalculator.d.ts +48 -0
- package/dist/Components/Charts/Utils/ChartBarCalculator.js +66 -0
- package/dist/Components/Charts/Utils/ChartColors.d.ts +13 -0
- package/dist/Components/Charts/Utils/ChartColors.js +10 -0
- package/dist/Components/Charts/Utils/ChartTooltipFormatter.d.ts +43 -0
- package/dist/Components/Charts/Utils/ChartTooltipFormatter.js +57 -0
- package/dist/Components/Charts/Utils/ReactEChartsCore.d.ts +4 -0
- package/dist/Components/Charts/Utils/ReactEChartsCore.js +5 -0
- package/dist/Components/Charts/Utils/ThemeColor.d.ts +21 -0
- package/dist/Components/Charts/Utils/ThemeColor.js +54 -0
- package/dist/Components/Charts/Utils/TimeFormatter.d.ts +9 -0
- package/dist/Components/Charts/Utils/TimeFormatter.js +25 -0
- package/dist/Components/Charts/Utils/escapeTooltipHtml.d.ts +6 -0
- package/dist/Components/Charts/Utils/escapeTooltipHtml.js +5 -0
- package/dist/Components/Charts/Utils/index.d.ts +5 -0
- package/dist/Components/Charts/Utils/index.js +14 -0
- package/dist/Components/Charts/index.d.ts +6 -0
- package/dist/Components/Charts/index.js +29 -0
- package/dist/Components/Colors/Colors.d.ts +19 -0
- package/dist/Components/Colors/Colors.js +154 -0
- package/dist/Components/Colors/index.d.ts +1 -0
- package/dist/Components/Colors/index.js +4 -0
- package/dist/Components/DataTable/DataTable.d.ts +86 -0
- package/dist/Components/DataTable/DataTable.js +122 -0
- package/dist/Components/DataTable/Paginator.d.ts +41 -0
- package/dist/Components/DataTable/Paginator.js +122 -0
- package/dist/Components/DataTable/ProportionBar.d.ts +48 -0
- package/dist/Components/DataTable/ProportionBar.js +20 -0
- package/dist/Components/DataTable/index.d.ts +3 -0
- package/dist/Components/DataTable/index.js +9 -0
- package/dist/Components/Dialog/Dialog.d.ts +49 -0
- package/dist/Components/Dialog/Dialog.js +83 -0
- package/dist/Components/Dialog/Drawer.d.ts +45 -0
- package/dist/Components/Dialog/Drawer.js +120 -0
- package/dist/Components/Dialog/index.d.ts +3 -0
- package/dist/Components/Dialog/index.js +12 -0
- package/dist/Components/Dialog/modal.types.d.ts +47 -0
- package/dist/Components/Dialog/modal.types.js +8 -0
- package/dist/Components/Facets/FacetCount.d.ts +11 -0
- package/dist/Components/Facets/FacetCount.js +8 -0
- package/dist/Components/Facets/FacetCountsCaption.d.ts +16 -0
- package/dist/Components/Facets/FacetCountsCaption.js +14 -0
- package/dist/Components/Facets/FacetInnerLightButton.d.ts +10 -0
- package/dist/Components/Facets/FacetInnerLightButton.js +17 -0
- package/dist/Components/Facets/FacetLabel.d.ts +13 -0
- package/dist/Components/Facets/FacetLabel.js +15 -0
- package/dist/Components/Facets/FacetList.d.ts +40 -0
- package/dist/Components/Facets/FacetList.js +37 -0
- package/dist/Components/Facets/FacetListCard.d.ts +38 -0
- package/dist/Components/Facets/FacetListCard.js +47 -0
- package/dist/Components/Facets/FacetResetLink.d.ts +13 -0
- package/dist/Components/Facets/FacetResetLink.js +23 -0
- package/dist/Components/Facets/Variants/DateRangeFacet.d.ts +47 -0
- package/dist/Components/Facets/Variants/DateRangeFacet.js +51 -0
- package/dist/Components/Facets/Variants/MultipleChoiceFacet.d.ts +67 -0
- package/dist/Components/Facets/Variants/MultipleChoiceFacet.js +200 -0
- package/dist/Components/Facets/Variants/PerformanceFacet.d.ts +61 -0
- package/dist/Components/Facets/Variants/PerformanceFacet.js +77 -0
- package/dist/Components/Facets/Variants/SingleChoiceFacet.d.ts +56 -0
- package/dist/Components/Facets/Variants/SingleChoiceFacet.js +54 -0
- package/dist/Components/Facets/Variants/index.d.ts +8 -0
- package/dist/Components/Facets/Variants/index.js +10 -0
- package/dist/Components/Facets/Variants/nestedValues.d.ts +33 -0
- package/dist/Components/Facets/Variants/nestedValues.js +87 -0
- package/dist/Components/Facets/index.d.ts +15 -0
- package/dist/Components/Facets/index.js +27 -0
- package/dist/Components/Formatter/BodyNotice.d.ts +9 -0
- package/dist/Components/Formatter/BodyNotice.js +21 -0
- package/dist/Components/Formatter/CodeFormatter.d.ts +47 -0
- package/dist/Components/Formatter/CodeFormatter.js +47 -0
- package/dist/Components/Formatter/HeadersDisplay.d.ts +9 -0
- package/dist/Components/Formatter/HeadersDisplay.js +18 -0
- package/dist/Components/Formatter/JsonTreeView.d.ts +27 -0
- package/dist/Components/Formatter/JsonTreeView.js +145 -0
- package/dist/Components/Formatter/PerformanceMetrics.d.ts +27 -0
- package/dist/Components/Formatter/PerformanceMetrics.js +29 -0
- package/dist/Components/Formatter/SyntaxHighlighter.d.ts +11 -0
- package/dist/Components/Formatter/SyntaxHighlighter.js +16 -0
- package/dist/Components/Formatter/VirtualizedCodeView.d.ts +24 -0
- package/dist/Components/Formatter/VirtualizedCodeView.js +47 -0
- package/dist/Components/Formatter/bodyLimits.d.ts +6 -0
- package/dist/Components/Formatter/bodyLimits.js +6 -0
- package/dist/Components/Formatter/index.d.ts +8 -0
- package/dist/Components/Formatter/index.js +16 -0
- package/dist/Components/Formatter/syntaxTheme.d.ts +8 -0
- package/dist/Components/Formatter/syntaxTheme.js +15 -0
- package/dist/Components/Formatter/useCodeHighlighting.d.ts +15 -0
- package/dist/Components/Formatter/useCodeHighlighting.js +47 -0
- package/dist/Components/Formatter/useVirtualization.d.ts +29 -0
- package/dist/Components/Formatter/useVirtualization.js +18 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.d.ts +6 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.js +75 -0
- package/dist/Components/Inputs/Checkbox/index.d.ts +1 -0
- package/dist/Components/Inputs/Checkbox/index.js +4 -0
- package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.d.ts +48 -0
- package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.js +71 -0
- package/dist/Components/Inputs/DateRangeSelector/index.d.ts +1 -0
- package/dist/Components/Inputs/DateRangeSelector/index.js +4 -0
- package/dist/Components/Inputs/Field/Field.d.ts +19 -0
- package/dist/Components/Inputs/Field/Field.js +35 -0
- package/dist/Components/Inputs/Field/index.d.ts +2 -0
- package/dist/Components/Inputs/Field/index.js +7 -0
- package/dist/Components/Inputs/Field/useField.d.ts +33 -0
- package/dist/Components/Inputs/Field/useField.js +36 -0
- package/dist/Components/Inputs/Input/Input.d.ts +85 -0
- package/dist/Components/Inputs/Input/Input.js +146 -0
- package/dist/Components/Inputs/Input/index.d.ts +1 -0
- package/dist/Components/Inputs/Input/index.js +4 -0
- package/dist/Components/Inputs/InputAddon/InputAddon.d.ts +21 -0
- package/dist/Components/Inputs/InputAddon/InputAddon.js +18 -0
- package/dist/Components/Inputs/InputAddon/index.d.ts +1 -0
- package/dist/Components/Inputs/InputAddon/index.js +4 -0
- package/dist/Components/Inputs/InputButton/InputButton.d.ts +21 -0
- package/dist/Components/Inputs/InputButton/InputButton.js +29 -0
- package/dist/Components/Inputs/InputButton/index.d.ts +1 -0
- package/dist/Components/Inputs/InputButton/index.js +4 -0
- package/dist/Components/Inputs/InputIcon/InputIcon.d.ts +20 -0
- package/dist/Components/Inputs/InputIcon/InputIcon.js +16 -0
- package/dist/Components/Inputs/InputIcon/index.d.ts +1 -0
- package/dist/Components/Inputs/InputIcon/index.js +4 -0
- package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.d.ts +12 -0
- package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.js +18 -0
- package/dist/Components/Inputs/KeyboardShortcut/index.d.ts +1 -0
- package/dist/Components/Inputs/KeyboardShortcut/index.js +4 -0
- package/dist/Components/Inputs/Radio/Radio.d.ts +3 -0
- package/dist/Components/Inputs/Radio/Radio.js +59 -0
- package/dist/Components/Inputs/Radio/index.d.ts +1 -0
- package/dist/Components/Inputs/Radio/index.js +4 -0
- package/dist/Components/Inputs/SearchInput/SearchInput.d.ts +9 -0
- package/dist/Components/Inputs/SearchInput/SearchInput.js +48 -0
- package/dist/Components/Inputs/SearchInput/index.d.ts +2 -0
- package/dist/Components/Inputs/SearchInput/index.js +4 -0
- package/dist/Components/Inputs/Sliders/RangeSlider.d.ts +40 -0
- package/dist/Components/Inputs/Sliders/RangeSlider.js +160 -0
- package/dist/Components/Inputs/Sliders/index.d.ts +2 -0
- package/dist/Components/Inputs/Sliders/index.js +4 -0
- package/dist/Components/Inputs/Textarea/Textarea.d.ts +56 -0
- package/dist/Components/Inputs/Textarea/Textarea.js +79 -0
- package/dist/Components/Inputs/Textarea/index.d.ts +1 -0
- package/dist/Components/Inputs/Textarea/index.js +4 -0
- package/dist/Components/Inputs/choiceInput.d.ts +12 -0
- package/dist/Components/Inputs/choiceInput.js +8 -0
- package/dist/Components/Inputs/index.d.ts +11 -0
- package/dist/Components/Inputs/index.js +24 -0
- package/dist/Components/Layouts/DefaultLayout.d.ts +30 -0
- package/dist/Components/Layouts/DefaultLayout.js +25 -0
- package/dist/Components/Layouts/index.d.ts +2 -0
- package/dist/Components/Layouts/index.js +4 -0
- package/dist/Components/NavBar/Assets/defaultAvatar.d.ts +4 -0
- package/dist/Components/NavBar/Assets/defaultAvatar.js +28 -0
- package/dist/Components/NavBar/Assets/index.d.ts +2 -0
- package/dist/Components/NavBar/Assets/index.js +4 -0
- package/dist/Components/NavBar/NavBar.d.ts +58 -0
- package/dist/Components/NavBar/NavBar.js +141 -0
- package/dist/Components/NavBar/index.d.ts +1 -0
- package/dist/Components/NavBar/index.js +5 -0
- package/dist/Components/Tabs/Tabs.d.ts +24 -0
- package/dist/Components/Tabs/Tabs.js +69 -0
- package/dist/Components/Tabs/index.d.ts +2 -0
- package/dist/Components/Tabs/index.js +5 -0
- package/dist/Components/Toast/Toast.d.ts +28 -0
- package/dist/Components/Toast/Toast.js +128 -0
- package/dist/Components/Toast/ToastContainer.d.ts +29 -0
- package/dist/Components/Toast/ToastContainer.js +28 -0
- package/dist/Components/Toast/ToastContext.d.ts +103 -0
- package/dist/Components/Toast/ToastContext.js +124 -0
- package/dist/Components/Toast/index.d.ts +3 -0
- package/dist/Components/Toast/index.js +13 -0
- package/dist/Components/Typography/HeadingLevel.d.ts +28 -0
- package/dist/Components/Typography/HeadingLevel.js +20 -0
- package/dist/Components/Typography/Paragraphs.d.ts +8 -0
- package/dist/Components/Typography/Paragraphs.js +6 -0
- package/dist/Components/Typography/Section.d.ts +8 -0
- package/dist/Components/Typography/Section.js +6 -0
- package/dist/Components/Typography/Titles.d.ts +31 -0
- package/dist/Components/Typography/Titles.js +14 -0
- package/dist/Components/Typography/index.d.ts +4 -0
- package/dist/Components/Typography/index.js +17 -0
- package/dist/Components/Utilities/Foldable.d.ts +42 -0
- package/dist/Components/Utilities/Foldable.js +39 -0
- package/dist/Components/Utilities/index.d.ts +2 -0
- package/dist/Components/Utilities/index.js +6 -0
- package/dist/Components/Utilities/useClickOutside.d.ts +21 -0
- package/dist/Components/Utilities/useClickOutside.js +23 -0
- package/dist/Components/index.d.ts +16 -0
- package/dist/Components/index.js +158 -0
- package/dist/Elements/Http/CacheBadge.d.ts +13 -0
- package/dist/Elements/Http/CacheBadge.js +34 -0
- package/dist/Elements/Http/CacheIndicator.d.ts +17 -0
- package/dist/Elements/Http/CacheIndicator.js +47 -0
- package/dist/Elements/Http/RequestMethodBadge.d.ts +5 -0
- package/dist/Elements/Http/RequestMethodBadge.js +13 -0
- package/dist/Elements/Http/ResponseStatusBadge.d.ts +19 -0
- package/dist/Elements/Http/ResponseStatusBadge.js +20 -0
- package/dist/Elements/Http/index.d.ts +4 -0
- package/dist/Elements/Http/index.js +10 -0
- package/dist/Elements/System/CircuitBreakerStatus.d.ts +11 -0
- package/dist/Elements/System/CircuitBreakerStatus.js +98 -0
- package/dist/Elements/System/EndpointNode.d.ts +10 -0
- package/dist/Elements/System/EndpointNode.js +19 -0
- package/dist/Elements/System/EntrypointNode.d.ts +9 -0
- package/dist/Elements/System/EntrypointNode.js +17 -0
- package/dist/Elements/System/NetworkEdges.d.ts +37 -0
- package/dist/Elements/System/NetworkEdges.js +52 -0
- package/dist/Elements/System/NetworkMap.d.ts +33 -0
- package/dist/Elements/System/NetworkMap.js +121 -0
- package/dist/Elements/System/NetworkNode.d.ts +29 -0
- package/dist/Elements/System/NetworkNode.js +31 -0
- package/dist/Elements/System/ProxyNode.d.ts +8 -0
- package/dist/Elements/System/ProxyNode.js +10 -0
- package/dist/Elements/System/index.d.ts +9 -0
- package/dist/Elements/System/index.js +17 -0
- package/dist/Elements/Tpdex/TpdexBadge.d.ts +26 -0
- package/dist/Elements/Tpdex/TpdexBadge.js +36 -0
- package/dist/Elements/Tpdex/index.d.ts +4 -0
- package/dist/Elements/Tpdex/index.js +8 -0
- package/dist/Elements/Transactions/TransactionFiltersCard.d.ts +41 -0
- package/dist/Elements/Transactions/TransactionFiltersCard.js +121 -0
- package/dist/Elements/Transactions/TransactionsExplorerSidebar.d.ts +37 -0
- package/dist/Elements/Transactions/TransactionsExplorerSidebar.js +154 -0
- package/dist/Elements/Transactions/TransactionsFiltersSidebar.d.ts +22 -0
- package/dist/Elements/Transactions/TransactionsFiltersSidebar.js +39 -0
- package/dist/Elements/Transactions/index.d.ts +13 -0
- package/dist/Elements/Transactions/index.js +9 -0
- package/dist/Elements/index.d.ts +18 -0
- package/dist/Elements/index.js +38 -0
- package/dist/Models/Filters/active.d.ts +12 -0
- package/dist/Models/Filters/active.js +10 -0
- package/dist/Models/Filters/dates.d.ts +8 -0
- package/dist/Models/Filters/dates.js +16 -0
- package/dist/Models/Filters/index.d.ts +4 -0
- package/dist/Models/Filters/index.js +13 -0
- package/dist/Models/Filters/read.d.ts +9 -0
- package/dist/Models/Filters/read.js +22 -0
- package/dist/Models/Filters/types.d.ts +50 -0
- package/dist/Models/Filters/types.js +1 -0
- package/dist/Models/Http/body.d.ts +7 -0
- package/dist/Models/Http/body.js +6 -0
- package/dist/Models/Http/contentDisposition.d.ts +7 -0
- package/dist/Models/Http/contentDisposition.js +51 -0
- package/dist/Models/Http/dataUrl.d.ts +12 -0
- package/dist/Models/Http/dataUrl.js +21 -0
- package/dist/Models/Http/headers.d.ts +18 -0
- package/dist/Models/Http/headers.js +7 -0
- package/dist/Models/Http/index.d.ts +2 -0
- package/dist/Models/Http/index.js +6 -0
- package/dist/Models/Http/percent.d.ts +5 -0
- package/dist/Models/Http/percent.js +17 -0
- package/dist/Models/Http/requestTarget.d.ts +11 -0
- package/dist/Models/Http/requestTarget.js +7 -0
- package/dist/Models/System/index.d.ts +1 -0
- package/dist/Models/System/index.js +7 -0
- package/dist/Models/System/types.d.ts +20 -0
- package/dist/Models/System/types.js +48 -0
- package/dist/Models/Tpdex.d.ts +36 -0
- package/dist/Models/Tpdex.js +38 -0
- package/dist/Models/Transactions/Overview.d.ts +19 -0
- package/dist/Models/Transactions/Overview.js +1 -0
- package/dist/Models/Transactions/encoding.d.ts +49 -0
- package/dist/Models/Transactions/encoding.js +26 -0
- package/dist/Models/Transactions/endpoints.d.ts +15 -0
- package/dist/Models/Transactions/endpoints.js +21 -0
- package/dist/Models/Transactions/facets.d.ts +25 -0
- package/dist/Models/Transactions/facets.js +40 -0
- package/dist/Models/Transactions/filtering.d.ts +20 -0
- package/dist/Models/Transactions/filtering.js +34 -0
- package/dist/Models/Transactions/treeDepth.d.ts +2 -0
- package/dist/Models/Transactions/treeDepth.js +4 -0
- package/dist/Models/Transactions/types.d.ts +58 -0
- package/dist/Models/Transactions/types.js +1 -0
- package/dist/Models/index.d.ts +10 -0
- package/dist/Models/index.js +46 -0
- package/dist/Pages/Alerts/AlertsPage.d.ts +18 -0
- package/dist/Pages/Alerts/AlertsPage.js +104 -0
- package/dist/Pages/Alerts/index.d.ts +1 -0
- package/dist/Pages/Alerts/index.js +4 -0
- package/dist/Pages/Explorer/ExplorerPage.d.ts +6 -0
- package/dist/Pages/Explorer/ExplorerPage.js +55 -0
- package/dist/Pages/Explorer/index.d.ts +1 -0
- package/dist/Pages/Explorer/index.js +4 -0
- package/dist/Pages/Overview/OverviewPage.d.ts +11 -0
- package/dist/Pages/Overview/OverviewPage.js +10 -0
- package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.d.ts +7 -0
- package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.js +32 -0
- package/dist/Pages/Overview/Sections/Components/index.d.ts +1 -0
- package/dist/Pages/Overview/Sections/Components/index.js +4 -0
- package/dist/Pages/Overview/Sections/HistorySection.d.ts +18 -0
- package/dist/Pages/Overview/Sections/HistorySection.js +21 -0
- package/dist/Pages/Overview/Sections/SummarySection.d.ts +44 -0
- package/dist/Pages/Overview/Sections/SummarySection.js +127 -0
- package/dist/Pages/Overview/index.d.ts +4 -0
- package/dist/Pages/Overview/index.js +8 -0
- package/dist/Pages/SystemPage/SystemPage.d.ts +8 -0
- package/dist/Pages/SystemPage/SystemPage.js +16 -0
- package/dist/Pages/SystemPage/index.d.ts +1 -0
- package/dist/Pages/SystemPage/index.js +4 -0
- package/dist/Pages/Transactions/Detail/Components/DownloadButton.d.ts +33 -0
- package/dist/Pages/Transactions/Detail/Components/DownloadButton.js +62 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMessage.d.ts +16 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMessage.js +44 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.d.ts +21 -0
- package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.js +127 -0
- package/dist/Pages/Transactions/Detail/Components/index.d.ts +6 -0
- package/dist/Pages/Transactions/Detail/Components/index.js +8 -0
- package/dist/Pages/Transactions/Detail/TransactionsDetailPage.d.ts +8 -0
- package/dist/Pages/Transactions/Detail/TransactionsDetailPage.js +15 -0
- package/dist/Pages/Transactions/Detail/Utils/BodyPreview.d.ts +15 -0
- package/dist/Pages/Transactions/Detail/Utils/BodyPreview.js +30 -0
- package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.d.ts +28 -0
- package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.js +115 -0
- package/dist/Pages/Transactions/Detail/Utils/index.d.ts +4 -0
- package/dist/Pages/Transactions/Detail/Utils/index.js +9 -0
- package/dist/Pages/Transactions/Detail/index.d.ts +4 -0
- package/dist/Pages/Transactions/Detail/index.js +8 -0
- package/dist/Pages/Transactions/List/TransactionsListPage.d.ts +80 -0
- package/dist/Pages/Transactions/List/TransactionsListPage.js +220 -0
- package/dist/Pages/Transactions/List/index.d.ts +4 -0
- package/dist/Pages/Transactions/List/index.js +6 -0
- package/dist/Pages/Transactions/List/useClientSideTransactions.d.ts +38 -0
- package/dist/Pages/Transactions/List/useClientSideTransactions.js +32 -0
- package/dist/Pages/Transactions/index.d.ts +4 -0
- package/dist/Pages/Transactions/index.js +6 -0
- package/dist/Pages/index.d.ts +5 -0
- package/dist/Pages/index.js +18 -0
- package/dist/Settings.d.ts +13 -0
- package/dist/Settings.js +16 -0
- package/dist/css/Components/Formatter/prism.css +79 -0
- package/dist/css/Components/Inputs/Input/Input.css +73 -0
- package/dist/css/Components/Inputs/Sliders/RangeSliderStyles.css +92 -0
- package/dist/css/components.css +6 -0
- package/dist/css/fonts/Lato-Bold.woff2 +0 -0
- package/dist/css/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/Lato-Italic.woff2 +0 -0
- package/dist/css/fonts/Lato-Regular.woff2 +0 -0
- package/dist/css/fonts/OFL.txt +93 -0
- package/dist/css/theme.css +109 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +250 -0
- package/dist/logo.svg +1 -0
- package/dist/styles/styles.css +1 -0
- package/package.json +367 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as m } from "tailwind-merge";
|
|
3
|
+
import { Button as f } from "./Button.js";
|
|
4
|
+
const g = ({
|
|
5
|
+
isCurrent: s,
|
|
6
|
+
isFirst: t,
|
|
7
|
+
isLast: i,
|
|
8
|
+
className: o,
|
|
9
|
+
...r
|
|
10
|
+
}) => {
|
|
11
|
+
const l = "relative inline-flex items-center focus:z-10 px-3 py-2";
|
|
12
|
+
let e = "rounded-none";
|
|
13
|
+
t || (e += " -ml-px"), t && (e += " rounded-l-sm"), i && (e += " rounded-r-sm");
|
|
14
|
+
const c = m(
|
|
15
|
+
l,
|
|
16
|
+
e,
|
|
17
|
+
s ? "text-white bg-blue-600 hover:bg-blue-600 focus-visible:outline-blue-500 ring-1 ring-inset ring-blue-700" : "",
|
|
18
|
+
o
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ a(
|
|
21
|
+
f,
|
|
22
|
+
{
|
|
23
|
+
variant: s ? "primary" : "secondary",
|
|
24
|
+
className: c,
|
|
25
|
+
...r
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}, S = ({
|
|
29
|
+
buttonProps: s,
|
|
30
|
+
current: t,
|
|
31
|
+
setCurrent: i,
|
|
32
|
+
className: o,
|
|
33
|
+
...r
|
|
34
|
+
}) => /* @__PURE__ */ a(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
role: "group",
|
|
38
|
+
className: m("isolate inline-flex rounded-md shadow-xs", o),
|
|
39
|
+
...r,
|
|
40
|
+
children: s.map((l, e) => {
|
|
41
|
+
const { key: n, title: u } = l, c = n === t, p = e === 0, d = e === s.length - 1;
|
|
42
|
+
return /* @__PURE__ */ a(
|
|
43
|
+
g,
|
|
44
|
+
{
|
|
45
|
+
onClick: () => {
|
|
46
|
+
i(n);
|
|
47
|
+
},
|
|
48
|
+
type: "button",
|
|
49
|
+
isCurrent: c,
|
|
50
|
+
isFirst: p,
|
|
51
|
+
isLast: d,
|
|
52
|
+
children: u
|
|
53
|
+
},
|
|
54
|
+
n
|
|
55
|
+
);
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
export {
|
|
60
|
+
S as ButtonGroup
|
|
61
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ComponentProps, type FunctionComponent, type ReactNode } from "react";
|
|
2
|
+
export interface CardProps extends ComponentProps<"div"> {
|
|
3
|
+
/**
|
|
4
|
+
* Determines if the card has default padding for its content area.
|
|
5
|
+
*/
|
|
6
|
+
hasDefaultPadding?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Determines if the card has the default shadow and rounding styles.
|
|
9
|
+
*/
|
|
10
|
+
hasDefaultShadowAndRounding?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional custom CSS classes for the inner content `div`.
|
|
13
|
+
*/
|
|
14
|
+
contentClassName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional header content for the card.
|
|
17
|
+
*/
|
|
18
|
+
header?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Optional custom CSS classes for the header `div`.
|
|
21
|
+
*/
|
|
22
|
+
headerClassName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional footer content for the card.
|
|
25
|
+
*/
|
|
26
|
+
footer?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Optional custom CSS classes for the footer `div`.
|
|
29
|
+
*/
|
|
30
|
+
footerClassName?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Padding of a card's content area. Exported because panels that sit inside a card, or beside one,
|
|
34
|
+
* have to agree with it: three places hardcoded this same string, so a change to card padding would
|
|
35
|
+
* have moved one of them and left the others behind.
|
|
36
|
+
*/
|
|
37
|
+
export declare const contentPaddingClassName = "px-4 py-5 sm:p-6";
|
|
38
|
+
export declare const Card: FunctionComponent<CardProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { twMerge as s } from "tailwind-merge";
|
|
4
|
+
const N = "overflow-hidden bg-white ring-1 ring-gray-200 ", x = " sm:rounded-sm ", h = "px-4 py-5 sm:px-6", y = "px-4 py-4 sm:px-6", D = "px-4 py-5 sm:p-6", f = "divide-y divide-gray-200", R = ({
|
|
5
|
+
children: i,
|
|
6
|
+
hasDefaultPadding: d = !0,
|
|
7
|
+
hasDefaultShadowAndRounding: o = !0,
|
|
8
|
+
className: r,
|
|
9
|
+
contentClassName: t,
|
|
10
|
+
header: e,
|
|
11
|
+
headerClassName: m,
|
|
12
|
+
footer: a,
|
|
13
|
+
footerClassName: c,
|
|
14
|
+
...l
|
|
15
|
+
}) => {
|
|
16
|
+
const p = s(
|
|
17
|
+
N,
|
|
18
|
+
o ? x : "",
|
|
19
|
+
e || a ? f : "",
|
|
20
|
+
r
|
|
21
|
+
), v = s(d ? D : "", t), g = s(h, m), C = s(y, c);
|
|
22
|
+
return /* @__PURE__ */ u("div", { className: p, ...l, children: [
|
|
23
|
+
e && /* @__PURE__ */ n("div", { className: g, children: e }),
|
|
24
|
+
/* @__PURE__ */ n("div", { className: v, children: i }),
|
|
25
|
+
a && /* @__PURE__ */ n("div", { className: C, children: a })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
R as Card,
|
|
30
|
+
D as contentPaddingClassName
|
|
31
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
export interface StatCardProps extends ComponentProps<"div"> {
|
|
3
|
+
title: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
unit?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
trend?: {
|
|
8
|
+
value: number;
|
|
9
|
+
direction: "up" | "down" | "neutral";
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function StatCard({ title, value, unit, icon, trend, className, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { twMerge as o } from "tailwind-merge";
|
|
4
|
+
function N({ title: c, value: m, unit: l, icon: a, trend: e, className: r, ...n }) {
|
|
5
|
+
const i = e ? e.direction === "up" ? "text-success-700" : e.direction === "down" ? "text-danger-700" : "text-gray-500" : "", d = e ? e.direction === "up" ? "↑" : e.direction === "down" ? "↓" : "→" : null;
|
|
6
|
+
return /* @__PURE__ */ t("div", { className: o("flex flex-col", r), ...n, children: [
|
|
7
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
8
|
+
/* @__PURE__ */ s("h3", { className: "text-sm font-medium text-gray-500", children: c }),
|
|
9
|
+
a && /* @__PURE__ */ s("div", { className: "text-gray-400", children: a })
|
|
10
|
+
] }),
|
|
11
|
+
/* @__PURE__ */ t("div", { className: "mt-1 flex items-baseline", children: [
|
|
12
|
+
/* @__PURE__ */ s("div", { className: "text-2xl font-semibold text-gray-900", children: m }),
|
|
13
|
+
l && /* @__PURE__ */ s("div", { className: "ml-1 text-sm font-medium text-gray-500", children: l })
|
|
14
|
+
] }),
|
|
15
|
+
e && /* @__PURE__ */ s("div", { className: "mt-2", children: /* @__PURE__ */ t("span", { className: `text-sm ${i} flex items-center`, children: [
|
|
16
|
+
/* @__PURE__ */ s("span", { className: "mr-1", children: d }),
|
|
17
|
+
/* @__PURE__ */ t("span", { className: `font-medium ${i}`, children: [
|
|
18
|
+
e.value,
|
|
19
|
+
"%"
|
|
20
|
+
] }),
|
|
21
|
+
e.label && /* @__PURE__ */ s("span", { className: "ml-1 text-gray-500", children: e.label })
|
|
22
|
+
] }) })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
N as StatCard
|
|
27
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { OverviewTransaction } from "../../../Models/index.js";
|
|
2
|
+
import type { BarConfiguration } from "../Utils/ChartBarCalculator.js";
|
|
3
|
+
import { type ChartColors } from "../Utils/ChartColors.js";
|
|
4
|
+
export interface ThinBarChartProps {
|
|
5
|
+
data: OverviewTransaction[];
|
|
6
|
+
barConfig: BarConfiguration;
|
|
7
|
+
/** Series colours. Omitted, they are read from the theme tokens when the series are built. */
|
|
8
|
+
colors?: ChartColors;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates series configuration for thin bar charts with stacked components
|
|
12
|
+
*/
|
|
13
|
+
export declare function createThinBarSeries({ data, barConfig, colors, }: ThinBarChartProps): ({
|
|
14
|
+
name: string;
|
|
15
|
+
data: number[];
|
|
16
|
+
type: string;
|
|
17
|
+
color: string | undefined;
|
|
18
|
+
barWidth: string;
|
|
19
|
+
barGap: string;
|
|
20
|
+
stack: string;
|
|
21
|
+
label: {
|
|
22
|
+
show: boolean;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
data: number[];
|
|
27
|
+
type: string;
|
|
28
|
+
color: string | undefined;
|
|
29
|
+
barWidth: string;
|
|
30
|
+
stack: string;
|
|
31
|
+
label: {
|
|
32
|
+
show: boolean;
|
|
33
|
+
};
|
|
34
|
+
barGap?: undefined;
|
|
35
|
+
})[];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { chartColorTokens as o } from "../Utils/ChartColors.js";
|
|
2
|
+
import { resolveThemeColors as s } from "../Utils/ThemeColor.js";
|
|
3
|
+
function l({
|
|
4
|
+
data: e,
|
|
5
|
+
barConfig: r,
|
|
6
|
+
colors: t = s(o)
|
|
7
|
+
}) {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
name: "errors",
|
|
11
|
+
data: e.map((a) => a.errors),
|
|
12
|
+
type: "bar",
|
|
13
|
+
color: t.errors,
|
|
14
|
+
barWidth: r.mainBarWidth,
|
|
15
|
+
barGap: r.barGap,
|
|
16
|
+
stack: "total",
|
|
17
|
+
label: { show: !1 }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "cached",
|
|
21
|
+
data: e.map((a) => a.cached),
|
|
22
|
+
type: "bar",
|
|
23
|
+
color: t.cached,
|
|
24
|
+
barWidth: r.mainBarWidth,
|
|
25
|
+
stack: "total",
|
|
26
|
+
label: { show: !1 }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "successful",
|
|
30
|
+
data: e.map((a) => Math.max(0, a.count - a.errors - a.cached)),
|
|
31
|
+
type: "bar",
|
|
32
|
+
color: t.transactions,
|
|
33
|
+
barWidth: r.mainBarWidth,
|
|
34
|
+
stack: "total",
|
|
35
|
+
label: { show: !1 }
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
l as createThinBarSeries
|
|
41
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { OverviewTransaction } from "../../../Models/index.js";
|
|
2
|
+
import type { BarConfiguration } from "../Utils/ChartBarCalculator.js";
|
|
3
|
+
import { type ChartColors } from "../Utils/ChartColors.js";
|
|
4
|
+
export interface WideBarChartProps {
|
|
5
|
+
data: OverviewTransaction[];
|
|
6
|
+
barConfig: BarConfiguration;
|
|
7
|
+
labelOption?: {
|
|
8
|
+
show: boolean;
|
|
9
|
+
rotate: number;
|
|
10
|
+
formatter: string;
|
|
11
|
+
fontSize: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
rich: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
/** Series colours. Omitted, they are read from the theme tokens when the series are built. */
|
|
16
|
+
colors?: ChartColors;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates series configuration for wide bar charts with separate error/cached bars
|
|
20
|
+
*/
|
|
21
|
+
export declare function createWideBarSeries({ data, barConfig, labelOption, colors, }: WideBarChartProps): ({
|
|
22
|
+
name: string;
|
|
23
|
+
data: number[];
|
|
24
|
+
type: string;
|
|
25
|
+
color: string | undefined;
|
|
26
|
+
barWidth: string;
|
|
27
|
+
barGap: string;
|
|
28
|
+
label: {
|
|
29
|
+
show: boolean;
|
|
30
|
+
rotate: number;
|
|
31
|
+
formatter: string;
|
|
32
|
+
fontSize: number;
|
|
33
|
+
color?: string;
|
|
34
|
+
rich: Record<string, any>;
|
|
35
|
+
} | {
|
|
36
|
+
show: boolean;
|
|
37
|
+
};
|
|
38
|
+
stack?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
name: string;
|
|
41
|
+
data: number[];
|
|
42
|
+
type: string;
|
|
43
|
+
barWidth: string;
|
|
44
|
+
barGap: string;
|
|
45
|
+
color: string | undefined;
|
|
46
|
+
stack: string;
|
|
47
|
+
label?: undefined;
|
|
48
|
+
})[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { chartColorTokens as d } from "../Utils/ChartColors.js";
|
|
2
|
+
import { resolveThemeColors as c } from "../Utils/ThemeColor.js";
|
|
3
|
+
function i({
|
|
4
|
+
data: e,
|
|
5
|
+
barConfig: r,
|
|
6
|
+
labelOption: s,
|
|
7
|
+
colors: t = c(d)
|
|
8
|
+
}) {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
name: "transactions",
|
|
12
|
+
data: e.map((a) => a.count),
|
|
13
|
+
type: "bar",
|
|
14
|
+
color: t.transactions,
|
|
15
|
+
barWidth: r.mainBarWidth,
|
|
16
|
+
barGap: r.barGap,
|
|
17
|
+
label: r.showLabels && s ? s : { show: !1 }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "errors",
|
|
21
|
+
data: e.map((a) => a.errors),
|
|
22
|
+
type: "bar",
|
|
23
|
+
barWidth: r.detailBarWidth,
|
|
24
|
+
barGap: "0",
|
|
25
|
+
color: t.errors,
|
|
26
|
+
stack: "details"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "cached",
|
|
30
|
+
data: e.map((a) => a.cached),
|
|
31
|
+
type: "bar",
|
|
32
|
+
barWidth: r.detailBarWidth,
|
|
33
|
+
barGap: "0",
|
|
34
|
+
color: t.cached,
|
|
35
|
+
stack: "details"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "rest",
|
|
39
|
+
data: e.map((a) => Math.max(0, a.count - a.errors - a.cached)),
|
|
40
|
+
type: "bar",
|
|
41
|
+
barWidth: r.detailBarWidth,
|
|
42
|
+
barGap: "0",
|
|
43
|
+
color: t.rest,
|
|
44
|
+
stack: "details"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
i as createWideBarSeries
|
|
50
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ChartDimensions {
|
|
2
|
+
containerWidth: number;
|
|
3
|
+
containerHeight: number;
|
|
4
|
+
chartAreaWidth: number;
|
|
5
|
+
chartAreaHeight: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseChartDimensionsOptions {
|
|
8
|
+
defaultWidth?: number;
|
|
9
|
+
defaultHeight?: number;
|
|
10
|
+
padding?: {
|
|
11
|
+
left?: number;
|
|
12
|
+
right?: number;
|
|
13
|
+
top?: number;
|
|
14
|
+
bottom?: number;
|
|
15
|
+
};
|
|
16
|
+
debounceMs?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hook for tracking responsive chart dimensions with debounced resize handling
|
|
20
|
+
*/
|
|
21
|
+
export declare function useChartDimensions(options?: UseChartDimensionsOptions): {
|
|
22
|
+
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
23
|
+
dimensions: ChartDimensions;
|
|
24
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useRef as b, useState as p, useEffect as v } from "react";
|
|
2
|
+
function H(f = {}) {
|
|
3
|
+
const {
|
|
4
|
+
defaultWidth: i = 600,
|
|
5
|
+
defaultHeight: n = 300,
|
|
6
|
+
padding: e = { left: 40, right: 40, top: 20, bottom: 40 },
|
|
7
|
+
debounceMs: c = 100
|
|
8
|
+
} = f, t = b(null), [h, m] = p({
|
|
9
|
+
containerWidth: i,
|
|
10
|
+
containerHeight: n,
|
|
11
|
+
chartAreaWidth: i - (e.left || 0) - (e.right || 0),
|
|
12
|
+
chartAreaHeight: n - (e.top || 0) - (e.bottom || 0)
|
|
13
|
+
});
|
|
14
|
+
return v(() => {
|
|
15
|
+
const u = () => {
|
|
16
|
+
if (t.current) {
|
|
17
|
+
const { offsetWidth: l, offsetHeight: g } = t.current, a = l || i, d = g || n;
|
|
18
|
+
m({
|
|
19
|
+
containerWidth: a,
|
|
20
|
+
containerHeight: d,
|
|
21
|
+
chartAreaWidth: a - (e.left || 0) - (e.right || 0),
|
|
22
|
+
chartAreaHeight: d - (e.top || 0) - (e.bottom || 0)
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
let o;
|
|
27
|
+
const s = () => {
|
|
28
|
+
clearTimeout(o), o = setTimeout(u, c);
|
|
29
|
+
};
|
|
30
|
+
u();
|
|
31
|
+
let r = null;
|
|
32
|
+
return typeof ResizeObserver < "u" && t.current && (r = new ResizeObserver(s), r.observe(t.current)), window.addEventListener("resize", s), () => {
|
|
33
|
+
clearTimeout(o), r && r.disconnect(), window.removeEventListener("resize", s);
|
|
34
|
+
};
|
|
35
|
+
}, [i, n, e.left, e.right, e.top, e.bottom, c]), {
|
|
36
|
+
containerRef: t,
|
|
37
|
+
dimensions: h
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
H as useChartDimensions
|
|
42
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ThemeColors } from "../Utils/ThemeColor.js";
|
|
2
|
+
/**
|
|
3
|
+
* Theme tokens resolved to colours ECharts accepts, re-resolved whenever the theme changes.
|
|
4
|
+
*
|
|
5
|
+
* Resolved during render rather than in an effect, so the first paint already carries the theme's colours.
|
|
6
|
+
* Pass a stable `tokens` object (a module constant): a new one each render resolves each render.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useThemeColors<T extends Record<string, string>>(tokens: T): ThemeColors<T>;
|
|
9
|
+
/** One colour: a theme token (`--color-danger-200`) is resolved like `useThemeColors`, any other value is kept. */
|
|
10
|
+
export declare function useThemeColor(color: string | undefined): string | undefined;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useMemo as h, useSyncExternalStore as d } from "react";
|
|
2
|
+
import { resolveThemeColor as f, resolveThemeColors as b } from "../Utils/ThemeColor.js";
|
|
3
|
+
const r = /* @__PURE__ */ new Set();
|
|
4
|
+
let m = 0, c;
|
|
5
|
+
const a = (e) => e instanceof HTMLStyleElement || e instanceof HTMLLinkElement && /\bstylesheet\b/i.test(e.rel);
|
|
6
|
+
function v(e) {
|
|
7
|
+
return e.some(
|
|
8
|
+
({ target: t, addedNodes: s, removedNodes: i }) => [t, ...s, ...i].some(
|
|
9
|
+
(n) => a(n) || n.nodeType === Node.TEXT_NODE && !!n.parentNode && a(n.parentNode)
|
|
10
|
+
)
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function o() {
|
|
14
|
+
m += 1, r.forEach((e) => e());
|
|
15
|
+
}
|
|
16
|
+
function y() {
|
|
17
|
+
const e = new MutationObserver(o);
|
|
18
|
+
e.observe(document.documentElement, { attributes: !0, attributeFilter: ["class", "style", "data-theme"] });
|
|
19
|
+
const t = new MutationObserver((i) => {
|
|
20
|
+
v(i) && o();
|
|
21
|
+
});
|
|
22
|
+
t.observe(document.head, {
|
|
23
|
+
childList: !0,
|
|
24
|
+
subtree: !0,
|
|
25
|
+
characterData: !0,
|
|
26
|
+
attributes: !0,
|
|
27
|
+
attributeFilter: ["href", "media", "disabled", "rel"]
|
|
28
|
+
});
|
|
29
|
+
const s = typeof window.matchMedia == "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
30
|
+
return s?.addEventListener("change", o), () => {
|
|
31
|
+
e.disconnect(), t.disconnect(), s?.removeEventListener("change", o);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function T(e) {
|
|
35
|
+
return r.size === 0 && (c = y()), r.add(e), () => {
|
|
36
|
+
r.delete(e), r.size === 0 && c?.();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const u = () => m, l = () => d(T, u, u);
|
|
40
|
+
function w(e) {
|
|
41
|
+
const t = l();
|
|
42
|
+
return h(() => b(e), [e, t]);
|
|
43
|
+
}
|
|
44
|
+
function M(e) {
|
|
45
|
+
const t = l();
|
|
46
|
+
return h(() => e?.startsWith("--") ? f(e) : e, [e, t]);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
M as useThemeColor,
|
|
50
|
+
w as useThemeColors
|
|
51
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { LineChart as h } from "echarts/charts";
|
|
3
|
+
import { GridComponent as f, TooltipComponent as u, VisualMapComponent as g } from "echarts/components";
|
|
4
|
+
import * as p from "echarts/core";
|
|
5
|
+
import { CanvasRenderer as c } from "echarts/renderers";
|
|
6
|
+
import { useMemo as d } from "react";
|
|
7
|
+
import { ReactEChartsCore as b } from "./Utils/ReactEChartsCore.js";
|
|
8
|
+
import { TimeFormatter as C } from "./Utils/TimeFormatter.js";
|
|
9
|
+
import { escapeTooltipHtml as n } from "./Utils/escapeTooltipHtml.js";
|
|
10
|
+
import { tpdexScale as l, getTpdexRating as x } from "../../Models/Tpdex.js";
|
|
11
|
+
import { defaultEchartOptions as i } from "../../Settings.js";
|
|
12
|
+
import { useThemeColors as y, useThemeColor as T } from "./Hooks/useThemeColors.js";
|
|
13
|
+
p.use([h, c, f, u, g]);
|
|
14
|
+
const v = Object.fromEntries(l.map(({ label: e, token: o }) => [e, o])), O = (e) => {
|
|
15
|
+
const o = e[0];
|
|
16
|
+
let r = `<strong>${n(o.name)}</strong><br/>`;
|
|
17
|
+
const a = x(o.value);
|
|
18
|
+
return r += `<small>Average TPDEX: ${n(o.value)} (${a.label})</small>`, r;
|
|
19
|
+
}, P = ({ data: e }) => {
|
|
20
|
+
const o = y(v), r = T("--color-chart-out-of-range"), a = d(
|
|
21
|
+
() => ({
|
|
22
|
+
...i,
|
|
23
|
+
grid: {
|
|
24
|
+
...i.grid,
|
|
25
|
+
left: 8,
|
|
26
|
+
right: 64,
|
|
27
|
+
top: 64,
|
|
28
|
+
bottom: 24
|
|
29
|
+
},
|
|
30
|
+
xAxis: {
|
|
31
|
+
type: "category",
|
|
32
|
+
data: e.map((t) => C.formatTick(t.datetime, "24h"))
|
|
33
|
+
},
|
|
34
|
+
yAxis: {
|
|
35
|
+
type: "value",
|
|
36
|
+
min: 0,
|
|
37
|
+
max: 100,
|
|
38
|
+
axisLabel: { show: !1 }
|
|
39
|
+
},
|
|
40
|
+
tooltip: {
|
|
41
|
+
...i.tooltip,
|
|
42
|
+
formatter: O
|
|
43
|
+
},
|
|
44
|
+
series: [
|
|
45
|
+
{
|
|
46
|
+
data: e.map((t) => t.value),
|
|
47
|
+
type: "line",
|
|
48
|
+
smooth: !0,
|
|
49
|
+
symbol: "none",
|
|
50
|
+
lineStyle: {
|
|
51
|
+
width: 4
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
visualMap: {
|
|
56
|
+
bottom: 4,
|
|
57
|
+
right: 4,
|
|
58
|
+
pieces: l.map((t, m) => m === 0 ? {
|
|
59
|
+
label: t.label,
|
|
60
|
+
gte: t.threshold,
|
|
61
|
+
color: o[t.label]
|
|
62
|
+
} : m === l.length - 1 ? {
|
|
63
|
+
label: t.label,
|
|
64
|
+
lt: l[m - 1].threshold,
|
|
65
|
+
gte: 0,
|
|
66
|
+
color: o[t.label]
|
|
67
|
+
} : {
|
|
68
|
+
label: t.label,
|
|
69
|
+
lt: l[m - 1].threshold,
|
|
70
|
+
gte: t.threshold,
|
|
71
|
+
color: o[t.label]
|
|
72
|
+
}),
|
|
73
|
+
outOfRange: {
|
|
74
|
+
color: r
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
[e, o, r]
|
|
79
|
+
);
|
|
80
|
+
return /* @__PURE__ */ s(
|
|
81
|
+
b,
|
|
82
|
+
{
|
|
83
|
+
echarts: p,
|
|
84
|
+
option: a,
|
|
85
|
+
notMerge: !0,
|
|
86
|
+
lazyUpdate: !0,
|
|
87
|
+
opts: { height: 240, width: "auto" }
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
P as SummaryPerformancesChart
|
|
93
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SummaryRateChartProps {
|
|
2
|
+
data: {
|
|
3
|
+
value: number;
|
|
4
|
+
datetime: string;
|
|
5
|
+
}[];
|
|
6
|
+
/** A CSS colour, or a theme token such as `--color-danger-200`, which follows theme changes. */
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SummaryRateChart: ({ data, color }: SummaryRateChartProps) => import("react/jsx-runtime").JSX.Element;
|