@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,81 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { BarChart as d } from "echarts/charts";
|
|
3
|
+
import { GridComponent as c, TooltipComponent as f } from "echarts/components";
|
|
4
|
+
import * as s from "echarts/core";
|
|
5
|
+
import { CanvasRenderer as u } from "echarts/renderers";
|
|
6
|
+
import { useMemo as g } from "react";
|
|
7
|
+
import { ChartBarCalculator as C } from "./Utils/ChartBarCalculator.js";
|
|
8
|
+
import { ReactEChartsCore as y } from "./Utils/ReactEChartsCore.js";
|
|
9
|
+
import { TimeFormatter as x } from "./Utils/TimeFormatter.js";
|
|
10
|
+
import { escapeTooltipHtml as n } from "./Utils/escapeTooltipHtml.js";
|
|
11
|
+
import { defaultEchartOptions as i } from "../../Settings.js";
|
|
12
|
+
import { useChartDimensions as b } from "./Hooks/useChartDimensions.js";
|
|
13
|
+
import { useThemeColor as W } from "./Hooks/useThemeColors.js";
|
|
14
|
+
s.use([d, u, c, f]);
|
|
15
|
+
const v = (t) => {
|
|
16
|
+
const r = t[0];
|
|
17
|
+
let o = `<strong>${n(r.name)}</strong><br/>`;
|
|
18
|
+
return o += `<small>${n(r.value)}</small>`, o;
|
|
19
|
+
}, B = { left: 20, right: 20 }, O = ({ data: t, color: r }) => {
|
|
20
|
+
const o = W(r), { containerRef: p, dimensions: l } = b({ defaultWidth: 300, padding: B }), { barWidth: a } = C.calculateBarSizing({
|
|
21
|
+
dataLength: t.length,
|
|
22
|
+
chartAreaWidth: l.chartAreaWidth,
|
|
23
|
+
gapWidth: 2,
|
|
24
|
+
minBarWidth: 2,
|
|
25
|
+
maxBarWidth: t.length > 30 ? 10 : 19
|
|
26
|
+
}), h = g(
|
|
27
|
+
() => ({
|
|
28
|
+
...i,
|
|
29
|
+
grid: {
|
|
30
|
+
...i.grid,
|
|
31
|
+
left: 8,
|
|
32
|
+
right: 8,
|
|
33
|
+
top: 64,
|
|
34
|
+
bottom: 24
|
|
35
|
+
},
|
|
36
|
+
xAxis: {
|
|
37
|
+
type: "category",
|
|
38
|
+
data: t.map((e) => x.formatTick(e.datetime, "24h"))
|
|
39
|
+
},
|
|
40
|
+
yAxis: {
|
|
41
|
+
type: "value",
|
|
42
|
+
min: 0,
|
|
43
|
+
// Ensure Y-axis starts from 0, no negative values
|
|
44
|
+
axisLabel: { show: !1 }
|
|
45
|
+
},
|
|
46
|
+
tooltip: {
|
|
47
|
+
...i.tooltip,
|
|
48
|
+
formatter: v
|
|
49
|
+
},
|
|
50
|
+
series: [
|
|
51
|
+
{
|
|
52
|
+
data: t.map((e) => e.value),
|
|
53
|
+
type: "bar",
|
|
54
|
+
barWidth: `${a}px`,
|
|
55
|
+
barGap: "2px",
|
|
56
|
+
// 2px gap for summary charts
|
|
57
|
+
smooth: !1,
|
|
58
|
+
symbol: "none",
|
|
59
|
+
lineStyle: {
|
|
60
|
+
width: 4
|
|
61
|
+
},
|
|
62
|
+
color: o
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}),
|
|
66
|
+
[t, o, a]
|
|
67
|
+
);
|
|
68
|
+
return /* @__PURE__ */ m("div", { ref: p, style: { width: "100%" }, children: /* @__PURE__ */ m(
|
|
69
|
+
y,
|
|
70
|
+
{
|
|
71
|
+
echarts: s,
|
|
72
|
+
option: h,
|
|
73
|
+
notMerge: !0,
|
|
74
|
+
lazyUpdate: !0,
|
|
75
|
+
opts: { height: 240, width: "auto" }
|
|
76
|
+
}
|
|
77
|
+
) });
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
O as SummaryRateChart
|
|
81
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OverviewTransaction } from "../../Models/index.js";
|
|
2
|
+
export interface TransactionsChartProps {
|
|
3
|
+
data: Array<OverviewTransaction>;
|
|
4
|
+
timeRange?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TransactionsChart: ({ data, timeRange }: TransactionsChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { BarChart as f } from "echarts/charts";
|
|
3
|
+
import { GridComponent as d, TooltipComponent as u } from "echarts/components";
|
|
4
|
+
import * as p from "echarts/core";
|
|
5
|
+
import { CanvasRenderer as C } from "echarts/renderers";
|
|
6
|
+
import { useMemo as T } from "react";
|
|
7
|
+
import { ReactEChartsCore as g } from "./Utils/ReactEChartsCore.js";
|
|
8
|
+
import { defaultEchartOptions as n } from "../../Settings.js";
|
|
9
|
+
import { createThinBarSeries as B } from "./Components/ThinBarChart.js";
|
|
10
|
+
import { createWideBarSeries as W } from "./Components/WideBarChart.js";
|
|
11
|
+
import { useChartDimensions as S } from "./Hooks/useChartDimensions.js";
|
|
12
|
+
import { useThemeColors as y } from "./Hooks/useThemeColors.js";
|
|
13
|
+
import { ChartBarCalculator as b } from "./Utils/ChartBarCalculator.js";
|
|
14
|
+
import { chartColorTokens as x } from "./Utils/ChartColors.js";
|
|
15
|
+
import { ChartTooltipFormatter as s } from "./Utils/ChartTooltipFormatter.js";
|
|
16
|
+
import { TimeFormatter as A } from "./Utils/TimeFormatter.js";
|
|
17
|
+
p.use([f, C, d, u]);
|
|
18
|
+
const O = {
|
|
19
|
+
show: !0,
|
|
20
|
+
rotate: 90,
|
|
21
|
+
formatter: "{c}",
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
rich: {
|
|
24
|
+
name: {}
|
|
25
|
+
}
|
|
26
|
+
}, I = ({ data: t, timeRange: a }) => {
|
|
27
|
+
const { containerRef: c, dimensions: r } = S({
|
|
28
|
+
defaultWidth: 600,
|
|
29
|
+
defaultHeight: 300,
|
|
30
|
+
padding: { left: 40, right: 40, top: 20, bottom: 40 }
|
|
31
|
+
}), o = y(x), h = T(() => {
|
|
32
|
+
const e = b.calculateBarConfig({
|
|
33
|
+
dataLength: t.length,
|
|
34
|
+
chartAreaWidth: r.chartAreaWidth,
|
|
35
|
+
containerWidth: r.containerWidth
|
|
36
|
+
}), l = () => e.useSplitBars ? W({ data: t, barConfig: e, labelOption: { ...O, color: o.label }, colors: o }) : B({ data: t, barConfig: e, colors: o });
|
|
37
|
+
return {
|
|
38
|
+
...n,
|
|
39
|
+
xAxis: {
|
|
40
|
+
type: "category",
|
|
41
|
+
data: t.map((i) => A.formatTick(i.datetime, a))
|
|
42
|
+
},
|
|
43
|
+
yAxis: {
|
|
44
|
+
type: "value",
|
|
45
|
+
min: 0
|
|
46
|
+
},
|
|
47
|
+
tooltip: {
|
|
48
|
+
...n.tooltip,
|
|
49
|
+
formatter: e.useSplitBars ? s.formatSplitBarsTooltip : (
|
|
50
|
+
// Same ECharts params as the other tooltip formatters: a series list this code does not narrow.
|
|
51
|
+
((i) => s.formatUnifiedBarsTooltip(i, t))
|
|
52
|
+
)
|
|
53
|
+
},
|
|
54
|
+
series: l()
|
|
55
|
+
};
|
|
56
|
+
}, [t, a, r.chartAreaWidth, r.containerWidth, o]);
|
|
57
|
+
return /* @__PURE__ */ m("div", { ref: c, style: { width: "100%" }, children: /* @__PURE__ */ m(
|
|
58
|
+
g,
|
|
59
|
+
{
|
|
60
|
+
echarts: p,
|
|
61
|
+
option: h,
|
|
62
|
+
notMerge: !0,
|
|
63
|
+
lazyUpdate: !0,
|
|
64
|
+
opts: { height: 300, width: "auto" }
|
|
65
|
+
}
|
|
66
|
+
) });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
I as TransactionsChart
|
|
70
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface BarConfiguration {
|
|
2
|
+
mainBarWidth: string;
|
|
3
|
+
detailBarWidth: string;
|
|
4
|
+
showLabels: boolean;
|
|
5
|
+
useSplitBars: boolean;
|
|
6
|
+
calculatedWidth: number;
|
|
7
|
+
barGap: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BarCalculatorOptions {
|
|
10
|
+
dataLength: number;
|
|
11
|
+
chartAreaWidth: number;
|
|
12
|
+
containerWidth: number;
|
|
13
|
+
wideBarGapWidth?: number;
|
|
14
|
+
thinBarGapWidth?: number;
|
|
15
|
+
minBarWidth?: number;
|
|
16
|
+
maxBarWidth?: number;
|
|
17
|
+
detailBarWidthRatio?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Utility class for calculating responsive bar chart configurations
|
|
21
|
+
*/
|
|
22
|
+
export declare class ChartBarCalculator {
|
|
23
|
+
private static readonly DEFAULT_WIDE_GAP;
|
|
24
|
+
private static readonly DEFAULT_THIN_GAP;
|
|
25
|
+
private static readonly DEFAULT_MIN_WIDTH;
|
|
26
|
+
private static readonly DEFAULT_MAX_WIDTH;
|
|
27
|
+
private static readonly DEFAULT_DETAIL_RATIO;
|
|
28
|
+
/**
|
|
29
|
+
* Calculate responsive bar configuration based on data length and container dimensions
|
|
30
|
+
*/
|
|
31
|
+
static calculateBarConfig(options: BarCalculatorOptions): BarConfiguration;
|
|
32
|
+
/**
|
|
33
|
+
* Width of the bars that fit side by side in the chart area, once the gaps between them are
|
|
34
|
+
* reserved, clamped to the allowed range.
|
|
35
|
+
*/
|
|
36
|
+
static calculateBarSizing(options: {
|
|
37
|
+
dataLength: number;
|
|
38
|
+
chartAreaWidth: number;
|
|
39
|
+
gapWidth: number;
|
|
40
|
+
minBarWidth: number;
|
|
41
|
+
maxBarWidth: number;
|
|
42
|
+
}): {
|
|
43
|
+
barWidth: number;
|
|
44
|
+
gapWidth: number;
|
|
45
|
+
totalGapSpace: number;
|
|
46
|
+
};
|
|
47
|
+
private static shouldShowLabels;
|
|
48
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
class u {
|
|
2
|
+
static DEFAULT_WIDE_GAP = 4;
|
|
3
|
+
static DEFAULT_THIN_GAP = 2;
|
|
4
|
+
static DEFAULT_MIN_WIDTH = 3;
|
|
5
|
+
static DEFAULT_MAX_WIDTH = 38;
|
|
6
|
+
static DEFAULT_DETAIL_RATIO = 0.3;
|
|
7
|
+
/**
|
|
8
|
+
* Calculate responsive bar configuration based on data length and container dimensions
|
|
9
|
+
*/
|
|
10
|
+
static calculateBarConfig(d) {
|
|
11
|
+
const {
|
|
12
|
+
dataLength: t,
|
|
13
|
+
chartAreaWidth: a,
|
|
14
|
+
containerWidth: i,
|
|
15
|
+
wideBarGapWidth: r = this.DEFAULT_WIDE_GAP,
|
|
16
|
+
thinBarGapWidth: W = this.DEFAULT_THIN_GAP,
|
|
17
|
+
minBarWidth: s = this.DEFAULT_MIN_WIDTH,
|
|
18
|
+
maxBarWidth: e = this.DEFAULT_MAX_WIDTH,
|
|
19
|
+
detailBarWidthRatio: o = this.DEFAULT_DETAIL_RATIO
|
|
20
|
+
} = d, h = this.calculateBarSizing({
|
|
21
|
+
dataLength: t,
|
|
22
|
+
chartAreaWidth: a,
|
|
23
|
+
gapWidth: r,
|
|
24
|
+
minBarWidth: s,
|
|
25
|
+
maxBarWidth: e
|
|
26
|
+
}), B = this.calculateBarSizing({
|
|
27
|
+
dataLength: t,
|
|
28
|
+
chartAreaWidth: a,
|
|
29
|
+
gapWidth: W,
|
|
30
|
+
minBarWidth: s,
|
|
31
|
+
maxBarWidth: e
|
|
32
|
+
}), l = Math.max(2, h.barWidth * o), A = (h.barWidth + l) * t + h.totalGapSpace, n = h.barWidth >= 16 && A <= a, c = n ? h : B, p = n ? l : 0;
|
|
33
|
+
return {
|
|
34
|
+
mainBarWidth: `${c.barWidth}px`,
|
|
35
|
+
detailBarWidth: n ? `${p}px` : "0px",
|
|
36
|
+
showLabels: this.shouldShowLabels({
|
|
37
|
+
useWideBars: n,
|
|
38
|
+
dataLength: t,
|
|
39
|
+
containerWidth: i,
|
|
40
|
+
barWidth: c.barWidth
|
|
41
|
+
}),
|
|
42
|
+
useSplitBars: n,
|
|
43
|
+
calculatedWidth: c.barWidth,
|
|
44
|
+
barGap: `${c.gapWidth}px`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Width of the bars that fit side by side in the chart area, once the gaps between them are
|
|
49
|
+
* reserved, clamped to the allowed range.
|
|
50
|
+
*/
|
|
51
|
+
static calculateBarSizing(d) {
|
|
52
|
+
const { dataLength: t, chartAreaWidth: a, gapWidth: i, minBarWidth: r, maxBarWidth: W } = d, s = (t - 1) * i, e = a - s, o = Math.floor(e / t);
|
|
53
|
+
return {
|
|
54
|
+
barWidth: Math.max(r, Math.min(W, o)),
|
|
55
|
+
gapWidth: i,
|
|
56
|
+
totalGapSpace: s
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static shouldShowLabels(d) {
|
|
60
|
+
const { useWideBars: t, dataLength: a, containerWidth: i, barWidth: r } = d;
|
|
61
|
+
return t ? i < 400 ? a <= 12 && r >= 12 : i < 600 ? a <= 20 && r >= 10 : a <= 30 && r >= 16 : !1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
u as ChartBarCalculator
|
|
66
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ThemeColors } from "./ThemeColor.js";
|
|
2
|
+
/**
|
|
3
|
+
* Theme tokens behind the transaction charts. Errors and cached follow the danger and success tokens, so the
|
|
4
|
+
* Errors pane's ring and its chart move together.
|
|
5
|
+
*/
|
|
6
|
+
export declare const chartColorTokens: {
|
|
7
|
+
readonly transactions: "--color-chart-transactions";
|
|
8
|
+
readonly errors: "--color-danger-200";
|
|
9
|
+
readonly cached: "--color-success-200";
|
|
10
|
+
readonly rest: "--color-chart-rest";
|
|
11
|
+
readonly label: "--color-chart-label";
|
|
12
|
+
};
|
|
13
|
+
export type ChartColors = ThemeColors<typeof chartColorTokens>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { OverviewTransaction } from "../../../Models/index.js";
|
|
2
|
+
export interface TooltipData {
|
|
3
|
+
count: number;
|
|
4
|
+
errors: number;
|
|
5
|
+
cached: number;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SplitTooltipParams {
|
|
9
|
+
name: string;
|
|
10
|
+
value: number;
|
|
11
|
+
dataIndex?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Utility class for formatting chart tooltips with consistent styling and calculations
|
|
15
|
+
*/
|
|
16
|
+
export declare class ChartTooltipFormatter {
|
|
17
|
+
/**
|
|
18
|
+
* Format percentage with consistent styling
|
|
19
|
+
*/
|
|
20
|
+
private static formatPercentage;
|
|
21
|
+
/**
|
|
22
|
+
* The Transactions / Cached / Errors block shared by every tooltip
|
|
23
|
+
*/
|
|
24
|
+
private static formatBreakdown;
|
|
25
|
+
/**
|
|
26
|
+
* Create tooltip content for split bar charts (wide bars with separate error/cached bars)
|
|
27
|
+
*
|
|
28
|
+
* @returns HTML, with every interpolated input escaped
|
|
29
|
+
*/
|
|
30
|
+
static formatSplitBarsTooltip(params: SplitTooltipParams[]): string;
|
|
31
|
+
/**
|
|
32
|
+
* Create tooltip content for unified bar charts (stacked bars)
|
|
33
|
+
*
|
|
34
|
+
* @returns HTML, with every interpolated input escaped
|
|
35
|
+
*/
|
|
36
|
+
static formatUnifiedBarsTooltip(params: SplitTooltipParams[], data: OverviewTransaction[]): string;
|
|
37
|
+
/**
|
|
38
|
+
* Create tooltip content from transaction data directly
|
|
39
|
+
*
|
|
40
|
+
* @returns HTML, with every interpolated input escaped
|
|
41
|
+
*/
|
|
42
|
+
static formatTooltipFromData({ count, errors, cached, name }: TooltipData): string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { escapeTooltipHtml as o } from "./escapeTooltipHtml.js";
|
|
2
|
+
class s {
|
|
3
|
+
/**
|
|
4
|
+
* Format percentage with consistent styling
|
|
5
|
+
*/
|
|
6
|
+
static formatPercentage(r, a) {
|
|
7
|
+
return a ? (r / a).toLocaleString(void 0, {
|
|
8
|
+
style: "percent",
|
|
9
|
+
minimumFractionDigits: 1
|
|
10
|
+
}) : "n/a";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The Transactions / Cached / Errors block shared by every tooltip
|
|
14
|
+
*/
|
|
15
|
+
static formatBreakdown({ count: r, cached: a, errors: e }) {
|
|
16
|
+
const t = s.formatPercentage(e, r), n = s.formatPercentage(a, r);
|
|
17
|
+
return `<small>Transactions: ${o(r)}<br/>Cached: ${o(a)} (${n})<br/>Errors: ${o(e)} (${t})<br/></small>`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create tooltip content for split bar charts (wide bars with separate error/cached bars)
|
|
21
|
+
*
|
|
22
|
+
* @returns HTML, with every interpolated input escaped
|
|
23
|
+
*/
|
|
24
|
+
static formatSplitBarsTooltip(r) {
|
|
25
|
+
const [a, e, t] = r;
|
|
26
|
+
return s.formatTooltipFromData({
|
|
27
|
+
name: a.name,
|
|
28
|
+
count: a.value,
|
|
29
|
+
errors: e?.value || 0,
|
|
30
|
+
cached: t?.value || 0
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create tooltip content for unified bar charts (stacked bars)
|
|
35
|
+
*
|
|
36
|
+
* @returns HTML, with every interpolated input escaped
|
|
37
|
+
*/
|
|
38
|
+
static formatUnifiedBarsTooltip(r, a) {
|
|
39
|
+
const e = r[0]?.dataIndex;
|
|
40
|
+
if (e === void 0 || !a[e])
|
|
41
|
+
return `<strong>${o(r[0]?.name || "Unknown")}</strong><br/><small>No data available</small>`;
|
|
42
|
+
const { count: t, errors: n, cached: c } = a[e];
|
|
43
|
+
return `<strong>${o(r[0].name)}</strong><br/>${s.formatBreakdown({ count: t, errors: n, cached: c })}`;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create tooltip content from transaction data directly
|
|
47
|
+
*
|
|
48
|
+
* @returns HTML, with every interpolated input escaped
|
|
49
|
+
*/
|
|
50
|
+
static formatTooltipFromData({ count: r, errors: a, cached: e, name: t }) {
|
|
51
|
+
const n = `<strong>${o(t)}</strong><br/>`;
|
|
52
|
+
return r ? n + s.formatBreakdown({ count: r, errors: a, cached: e }) : `${n}<small>No transactions</small>`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
s as ChartTooltipFormatter
|
|
57
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme tokens are `oklch()` custom properties, and ECharts paints on a canvas with a colour parser that does not
|
|
3
|
+
* know `oklch()`. These helpers read a token from the computed style and hand ECharts an `rgb()` it parses.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Converts `oklch()` to `rgb()`/`rgba()`; any other colour ECharts understands is returned untouched. Returns
|
|
7
|
+
* `undefined` for a value ECharts cannot paint (malformed `oklch()`, `color-mix()`, `lab()`, `color()`...), so it
|
|
8
|
+
* keeps its own palette instead of getting `NaN`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toEchartsColor(value: string): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Resolves a theme token (`--color-danger-200`) to a colour ECharts accepts, from the live computed style so a
|
|
13
|
+
* retheme is seen. Returns `undefined` for an undefined token, so ECharts keeps its own palette instead of a
|
|
14
|
+
* guessed colour.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveThemeColor(token: string, element?: Element): string | undefined;
|
|
17
|
+
export type ThemeColors<T extends Record<string, string>> = {
|
|
18
|
+
[K in keyof T]: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
/** Resolves a record of tokens, keeping its keys. */
|
|
21
|
+
export declare function resolveThemeColors<T extends Record<string, string>>(tokens: T, element?: Element): ThemeColors<T>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const E = /^oklch\(\s*([^\s/)]+)\s+([^\s/)]+)\s+([^\s/)]+)(?:\s*\/\s*([^\s)]+))?\s*\)$/i, g = /^oklch\(/i, b = /^(?:color-mix|color|lab|lch|oklab)\(/i, p = "[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?", C = new RegExp(`^(${p})(%)?$`, "i"), $ = new RegExp(`^(${p})(deg|grad|rad|turn)?$`, "i"), N = { deg: 1, grad: 0.9, rad: 180 / Math.PI, turn: 360 }, f = (o, t, e) => Math.min(e, Math.max(t, o));
|
|
2
|
+
function m(o, t, e, n) {
|
|
3
|
+
if (o.toLowerCase() === "none") return f(0, e, n);
|
|
4
|
+
const r = C.exec(o);
|
|
5
|
+
if (!r) return;
|
|
6
|
+
const c = Number.parseFloat(r[1]);
|
|
7
|
+
return f(r[2] ? c / 100 * t : c, e, n);
|
|
8
|
+
}
|
|
9
|
+
function M(o) {
|
|
10
|
+
if (o.toLowerCase() === "none") return 0;
|
|
11
|
+
const t = $.exec(o);
|
|
12
|
+
if (!t) return;
|
|
13
|
+
const e = t[2]?.toLowerCase() ?? "deg";
|
|
14
|
+
return Number.parseFloat(t[1]) * N[e];
|
|
15
|
+
}
|
|
16
|
+
const R = (o) => {
|
|
17
|
+
const t = Math.min(1, Math.max(0, o));
|
|
18
|
+
return t <= 31308e-7 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - 0.055;
|
|
19
|
+
};
|
|
20
|
+
function T(o, t, e) {
|
|
21
|
+
const n = e * Math.PI / 180, r = t * Math.cos(n), c = t * Math.sin(n), s = (o + 0.3963377774 * r + 0.2158037573 * c) ** 3, i = (o - 0.1055613458 * r - 0.0638541728 * c) ** 3, a = (o - 0.0894841775 * r - 1.291485548 * c) ** 3;
|
|
22
|
+
return [
|
|
23
|
+
4.0767416621 * s - 3.3077115913 * i + 0.2309699292 * a,
|
|
24
|
+
-1.2684380046 * s + 2.6097574011 * i - 0.3413193965 * a,
|
|
25
|
+
-0.0041960863 * s - 0.7034186147 * i + 1.707614701 * a
|
|
26
|
+
].map((u) => Math.round(R(u) * 255));
|
|
27
|
+
}
|
|
28
|
+
function w(o) {
|
|
29
|
+
const t = o.trim();
|
|
30
|
+
if (b.test(t)) return;
|
|
31
|
+
if (!g.test(t)) return t;
|
|
32
|
+
const e = E.exec(t);
|
|
33
|
+
if (!e) return;
|
|
34
|
+
const [, n, r, c, s] = e, i = m(n, 1, 0, 1), a = m(r, 0.4, 0, Number.POSITIVE_INFINITY), d = M(c), u = s === void 0 ? void 0 : m(s, 1, 0, 1);
|
|
35
|
+
if (i === void 0 || a === void 0 || d === void 0 || s !== void 0 && u === void 0) return;
|
|
36
|
+
const [l, h, v] = T(i, a, d);
|
|
37
|
+
return u === void 0 ? `rgb(${l}, ${h}, ${v})` : `rgba(${l}, ${h}, ${v}, ${u})`;
|
|
38
|
+
}
|
|
39
|
+
function I(o, t) {
|
|
40
|
+
const e = t ?? (typeof document > "u" ? void 0 : document.documentElement);
|
|
41
|
+
if (!e) return;
|
|
42
|
+
const n = window.getComputedStyle(e).getPropertyValue(o).trim();
|
|
43
|
+
return n ? w(n) : void 0;
|
|
44
|
+
}
|
|
45
|
+
function P(o, t) {
|
|
46
|
+
return Object.fromEntries(
|
|
47
|
+
Object.entries(o).map(([e, n]) => [e, I(n, t)])
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
I as resolveThemeColor,
|
|
52
|
+
P as resolveThemeColors,
|
|
53
|
+
w as toEchartsColor
|
|
54
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class o {
|
|
2
|
+
/**
|
|
3
|
+
* Format tick labels based on time range
|
|
4
|
+
*/
|
|
5
|
+
static formatTick(e, r) {
|
|
6
|
+
const t = new Date(e);
|
|
7
|
+
switch (r) {
|
|
8
|
+
case "1h":
|
|
9
|
+
return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" });
|
|
10
|
+
case "24h":
|
|
11
|
+
return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" });
|
|
12
|
+
case "7d":
|
|
13
|
+
return t.toLocaleDateString(void 0, { weekday: "short", month: "short", day: "numeric" });
|
|
14
|
+
case "1m":
|
|
15
|
+
return t.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
16
|
+
case "1y":
|
|
17
|
+
return t.toLocaleDateString(void 0, { month: "short", year: "numeric" });
|
|
18
|
+
default:
|
|
19
|
+
return t.toLocaleDateString();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
o as TimeFormatter
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ECharts writes a tooltip formatter's string with `innerHTML`, and chart names and values can come from
|
|
3
|
+
* captured traffic. Every interpolated value goes through here. `String()` first, because ECharts hands
|
|
4
|
+
* values over raw, so a string can sit in a field typed as a number.
|
|
5
|
+
*/
|
|
6
|
+
export declare const escapeTooltipHtml: (value: unknown) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ChartBarCalculator, type BarConfiguration } from "./ChartBarCalculator.js";
|
|
2
|
+
export { ChartTooltipFormatter, type TooltipData, type SplitTooltipParams } from "./ChartTooltipFormatter.js";
|
|
3
|
+
export { TimeFormatter } from "./TimeFormatter.js";
|
|
4
|
+
export { chartColorTokens, type ChartColors } from "./ChartColors.js";
|
|
5
|
+
export { resolveThemeColor, resolveThemeColors, toEchartsColor, type ThemeColors } from "./ThemeColor.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChartBarCalculator as e } from "./ChartBarCalculator.js";
|
|
2
|
+
import { ChartTooltipFormatter as m } from "./ChartTooltipFormatter.js";
|
|
3
|
+
import { TimeFormatter as l } from "./TimeFormatter.js";
|
|
4
|
+
import { chartColorTokens as h } from "./ChartColors.js";
|
|
5
|
+
import { resolveThemeColor as f, resolveThemeColors as s, toEchartsColor as x } from "./ThemeColor.js";
|
|
6
|
+
export {
|
|
7
|
+
e as ChartBarCalculator,
|
|
8
|
+
m as ChartTooltipFormatter,
|
|
9
|
+
l as TimeFormatter,
|
|
10
|
+
h as chartColorTokens,
|
|
11
|
+
f as resolveThemeColor,
|
|
12
|
+
s as resolveThemeColors,
|
|
13
|
+
x as toEchartsColor
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { SummaryPerformancesChart, type SummaryPerformancesChartProps } from "./SummaryPerformancesChart.js";
|
|
2
|
+
export { SummaryRateChart, type SummaryRateChartProps } from "./SummaryRateChart.js";
|
|
3
|
+
export { TransactionsChart, type TransactionsChartProps } from "./TransactionsChart.js";
|
|
4
|
+
export * from "./Components/index.js";
|
|
5
|
+
export * from "./Utils/index.js";
|
|
6
|
+
export * from "./Hooks/index.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SummaryPerformancesChart as e } from "./SummaryPerformancesChart.js";
|
|
2
|
+
import { SummaryRateChart as m } from "./SummaryRateChart.js";
|
|
3
|
+
import { TransactionsChart as s } from "./TransactionsChart.js";
|
|
4
|
+
import { ChartBarCalculator as h } from "./Utils/ChartBarCalculator.js";
|
|
5
|
+
import { ChartTooltipFormatter as C } from "./Utils/ChartTooltipFormatter.js";
|
|
6
|
+
import { TimeFormatter as l } from "./Utils/TimeFormatter.js";
|
|
7
|
+
import { chartColorTokens as T } from "./Utils/ChartColors.js";
|
|
8
|
+
import { createThinBarSeries as n } from "./Components/ThinBarChart.js";
|
|
9
|
+
import { createWideBarSeries as S } from "./Components/WideBarChart.js";
|
|
10
|
+
import { resolveThemeColor as v, resolveThemeColors as y, toEchartsColor as F } from "./Utils/ThemeColor.js";
|
|
11
|
+
import { useChartDimensions as k } from "./Hooks/useChartDimensions.js";
|
|
12
|
+
import { useThemeColor as E, useThemeColors as P } from "./Hooks/useThemeColors.js";
|
|
13
|
+
export {
|
|
14
|
+
h as ChartBarCalculator,
|
|
15
|
+
C as ChartTooltipFormatter,
|
|
16
|
+
e as SummaryPerformancesChart,
|
|
17
|
+
m as SummaryRateChart,
|
|
18
|
+
l as TimeFormatter,
|
|
19
|
+
s as TransactionsChart,
|
|
20
|
+
T as chartColorTokens,
|
|
21
|
+
n as createThinBarSeries,
|
|
22
|
+
S as createWideBarSeries,
|
|
23
|
+
v as resolveThemeColor,
|
|
24
|
+
y as resolveThemeColors,
|
|
25
|
+
F as toEchartsColor,
|
|
26
|
+
k as useChartDimensions,
|
|
27
|
+
E as useThemeColor,
|
|
28
|
+
P as useThemeColors
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps, FunctionComponent } from "react";
|
|
2
|
+
export interface ColorItemProps extends Omit<ComponentProps<"td">, "onCopy"> {
|
|
3
|
+
name: string;
|
|
4
|
+
bgClass: string;
|
|
5
|
+
onCopy?: (hex: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface ColorPalette {
|
|
8
|
+
name: string;
|
|
9
|
+
variants: Array<{
|
|
10
|
+
shade: string;
|
|
11
|
+
bgClass: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export interface ColorsProps extends Omit<ComponentProps<"table">, "onCopy"> {
|
|
15
|
+
palettes?: ColorPalette[];
|
|
16
|
+
/** Called with the swatch's hex when it is clicked; copying and feedback are the consumer's. */
|
|
17
|
+
onCopy?: (hex: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const Colors: FunctionComponent<ColorsProps>;
|