@kumori/aurora-wui-components 0.0.281-dev4205.19 → 0.0.281-dev4205.20

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.
@@ -0,0 +1,15 @@
1
+ import { ChartTypeRegistry } from 'chart.js';
2
+ import { LitElement } from 'lit';
3
+ export declare class UsageChart extends LitElement {
4
+ chartType: keyof ChartTypeRegistry;
5
+ labels: string[];
6
+ data: Record<string, number[]>;
7
+ chartId: string;
8
+ detailChart: boolean;
9
+ isFullScreen: boolean;
10
+ yAxisMax: number | null;
11
+ height?: string;
12
+ private get _resolvedHeight();
13
+ render(): import('lit-html').TemplateResult<1>;
14
+ }
15
+ //# sourceMappingURL=usage-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-chart.d.ts","sourceRoot":"","sources":["../../../src/components/usage-chart/usage-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,+BAA+B,CAAC;AA4LvC,qBACa,UAAW,SAAQ,UAAU;IACZ,SAAS,EAAE,MAAM,iBAAiB,CAAU;IAC7C,MAAM,EAAE,MAAM,EAAE,CAAM;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IACpC,OAAO,EAAE,MAAM,CAAM;IACpB,WAAW,UAAS;IACpB,YAAY,UAAS;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAE5C,OAAO,KAAK,eAAe,GAI1B;IAED,MAAM;CAgBP"}
package/dist/index.d.ts CHANGED
@@ -142,4 +142,5 @@ export * from './components/axebow-paginated-table/axebow-paginated-table.js';
142
142
  export * from './components/axebow-carousel/axebow-carousel.js';
143
143
  export * from './components/wizard-page-layout/wizard-page-layout.js';
144
144
  export * from './components/axebow-premium-plan-popup/axebow-premium-plan-popup.js';
145
+ export * from './components/usage-chart/usage-chart.js';
145
146
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,qEAAqE,CAAC;AACpF,cAAc,6CAA6C,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AAC1H,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mEAAmE,CAAC;AAClF,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AACjE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,uDAAuD,CAAC;AACtE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mEAAmE,CAAC;AAClF,cAAc,2DAA2D,CAAC;AAC1E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yEAAyE,CAAC;AACxF,cAAc,uEAAuE,CAAC;AACtF,cAAc,8EAA8E,CAAC;AAC7F,cAAc,6DAA6D,CAAC;AAC5E,cAAc,mEAAmE,CAAC;AAClF,cAAc,yFAAyF,CAAC;AACxG,cAAc,2EAA2E,CAAC;AAC1F,cAAc,qEAAqE,CAAC;AACpF,cAAc,mCAAmC,CAAC;AAClD,cAAc,yD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C;AAC1E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,+EAA+E,CAAC;AAC9F,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qEAAqE,CAAC;AACpF,cAAc,uEAAuE,CAAC;AACtF,cAAc,6EAA6E,CAAC;AAC5F,cAAc,qDAAqD,CAAC;AACpE,cAAc,qCAAqC,CAAC;AACpD,cAAc,iEAAiE,CAAC;AAChF,cAAc,mDAAmD,CAAC;AAClE,cAAc,yDAAyD,CAAC;AACxE,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uDAAuD,CAAC;AACtE,cAAc,qDAAqD,CAAC;AACpE,cAAc,yEAAyE,CAAC;AACxF,cAAc,mEAAmE,CAAC;AAClF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iDAAiD,CAAC;AAChE,cAAc,uDAAuD,CAAC;AACtE,cAAc,qEAAqE,CAAC;AACpF,cAAc,yCAAyC,CAAC"}
package/dist/index.js CHANGED
@@ -15861,6 +15861,212 @@ __decorate([property({ type: String })], AxebowPremiumPlanPopup.prototype, "cont
15861
15861
  __decorate([property({ type: String })], AxebowPremiumPlanPopup.prototype, "anotherTimeLabel", void 0);
15862
15862
  AxebowPremiumPlanPopup = __decorate([customElement("axebow-premium-plan-popup")], AxebowPremiumPlanPopup);
15863
15863
  //#endregion
15864
- export { AxebowActionsFooter, AxebowAdjustmentResourcesCounter, AxebowAlert, AxebowBadge, AxebowBanner, AxebowBaseCard, AxebowBorderContainer, AxebowBoxSection, AxebowBoxedInput, AxebowBreadcrumbHeader, AxebowButton, AxebowCallToActionFeature, AxebowCallToActionRow, AxebowCardActionBanner, AxebowCardAttentionBanner, AxebowCardCloudLogo, AxebowCardFilter, AxebowCardFilterItem, AxebowCardFooter, AxebowCardHeader, AxebowCardResourceRow, AxebowCardResourceTable, AxebowCardSpecialLink, AxebowCardStatItem, AxebowCardStatsRow, AxebowCardStatus, AxebowCardTableHeader, AxebowCardVersionSelector, AxebowCarousel, AxebowCarouselInput, AxebowCarouselSelectorItem, AxebowCarouselSelectorTenant, AxebowChannelConfigPanel, AxebowCheckboxInput, AxebowCollaboratorsDialog, AxebowCopyBox, AxebowCopyIcon, AxebowCtaDialog, AxebowDeleteDataPopup, AxebowDeployCard, AxebowDeploySummary, AxebowDialog, AxebowDivider, AxebowDragDropUploadFile, AxebowDraggableService, AxebowEmptyState, AxebowExpandableCard, AxebowExpandableHeader, AxebowFilterBar, AxebowFooter, AxebowFormPanelField, AxebowGettingStartedCard, AxebowGraph, AxebowHeader, AxebowHelpBubble, AxebowIcon, AxebowInfrastructureCard, AxebowInput, AxebowInputBase, AxebowInstancesTable, AxebowLearningCenter, AxebowLimitsCounter, AxebowManageHyperlinks, AxebowMarketplaceCard, AxebowMobileWarningBanner, AxebowModal, AxebowModalsConfirmation, AxebowMoreActions, AxebowNumberCard, AxebowNumbersSection, AxebowNumericInput, AxebowObservabilityContainer, AxebowPageActions, AxebowPaginatedTable, AxebowPemDialog, AxebowPill, AxebowPlanProvidersModal, AxebowPlanSelectField, AxebowPremiumPlanPopup, AxebowProgressBar, AxebowProvidersInput, AxebowQuickTipButton, AxebowQuickTipSection, AxebowRefreshPeriodPanel, AxebowRegistrySelector, AxebowResourceBar, AxebowResourceBoxForm, AxebowResourceCard, AxebowResourceLimitInput, AxebowResourceLimitsPanel, AxebowResourcesCounter, AxebowRoleCard, AxebowRoleContainerDropdown, AxebowRoleTooltip, AxebowRuntimeZipDialog, AxebowSearch, AxebowSearchBarFilters, AxebowSelectInput, AxebowSelectInputWithDivider, AxebowSelectorCard, AxebowSelectorSlider, AxebowServiceDetailHeader, AxebowServicesPanel, AxebowSidebar, AxebowStatus, AxebowStepHeader, AxebowSummaryCard, AxebowSummaryFlavors, AxebowSummaryKeyValue, AxebowSummaryLimits, AxebowSummaryStep, AxebowSummaryStepHeader, AxebowSwitch, AxebowSwitchInput, AxebowTabSelector, AxebowTabsSubmenu, AxebowTagsInput, AxebowTenantCard, AxebowTenantResourceTable, AxebowTenantsTable, AxebowTextInput, AxebowTimeRangePanel, AxebowTooltip, AxebowUl, AxebowUndeployCard, AxebowUnderlineTabSelector, AxebowUsageTooltip, CRITICALITY_STYLES, CustomHomePageBody, DEFAULT_ADD_DIALOG_LABELS, DEFAULT_LOW_NOTE_TEXT, DeployModalComponent, DeployModalFooter, DeployModalHeader, DeployPageBody, STATUS_COLORS, TableChart, WizardPageLayout, axebowTheme, buildAddButton, buildCtaButtons, buildExternalNodeContent, buildMainNodeContent, createElement, createIcon, getCtaBadgeLabel, getCtaDescription, getCtaHeading, getHighestCriticality, groupCallToActionNotifications };
15864
+ //#region src/components/usage-chart/usage-chart.ts
15865
+ var COLOR_PALETTE = [
15866
+ {
15867
+ borderColor: "#4F46E5",
15868
+ backgroundColor: "rgba(79, 70, 229, 0.1)"
15869
+ },
15870
+ {
15871
+ borderColor: "#F97316",
15872
+ backgroundColor: "rgba(249, 115, 22, 0.1)"
15873
+ },
15874
+ {
15875
+ borderColor: "#10B981",
15876
+ backgroundColor: "rgba(16, 185, 129, 0.1)"
15877
+ },
15878
+ {
15879
+ borderColor: "#8B5CF6",
15880
+ backgroundColor: "rgba(139, 92, 246, 0.1)"
15881
+ },
15882
+ {
15883
+ borderColor: "#EF4444",
15884
+ backgroundColor: "rgba(239, 68, 68, 0.1)"
15885
+ }
15886
+ ];
15887
+ function generateHslColor(index) {
15888
+ const hue = index * 137.508 % 360;
15889
+ const saturation = 70 + index % 3 * 10;
15890
+ const lightness = 45 + index % 2 * 10;
15891
+ return {
15892
+ borderColor: `hsl(${hue}, ${saturation}%, ${lightness}%)`,
15893
+ backgroundColor: `hsla(${hue}, ${saturation}%, ${lightness}%, 0.1)`
15894
+ };
15895
+ }
15896
+ function getColorForDataset(index) {
15897
+ return index < COLOR_PALETTE.length ? COLOR_PALETTE[index] : generateHslColor(index);
15898
+ }
15899
+ function buildDatasets(data, detailChart) {
15900
+ return Object.entries(data).map(([key, dataArray], index) => {
15901
+ const colors = getColorForDataset(index);
15902
+ return {
15903
+ label: key,
15904
+ data: dataArray,
15905
+ borderColor: colors.borderColor,
15906
+ backgroundColor: colors.backgroundColor,
15907
+ fill: true,
15908
+ tension: .3,
15909
+ borderWidth: 2,
15910
+ pointRadius: detailChart ? 3 : 0,
15911
+ pointHoverRadius: detailChart ? 6 : 0,
15912
+ pointBackgroundColor: colors.borderColor,
15913
+ pointBorderColor: "#ffffff",
15914
+ pointBorderWidth: 2
15915
+ };
15916
+ });
15917
+ }
15918
+ function computeYMax(data, detailChart, yAxisMax) {
15919
+ if (yAxisMax !== null && yAxisMax > 0) return detailChart ? yAxisMax * 1.15 : yAxisMax;
15920
+ const allValues = Object.values(data).flat();
15921
+ const maxDataValue = Math.max(...allValues, 0);
15922
+ return detailChart ? void 0 : maxDataValue * 3;
15923
+ }
15924
+ function formatBandwidth(value) {
15925
+ if (value === 0) return "0 bps";
15926
+ if (value < 1e3) return `${value.toFixed(2)} bps`;
15927
+ if (value < 1e6) return `${(value / 1e3).toFixed(2)} Kbps`;
15928
+ if (value < 1e9) return `${(value / 1e6).toFixed(2)} Mbps`;
15929
+ return `${(value / 1e9).toFixed(2)} Gbps`;
15930
+ }
15931
+ function formatMemory(value) {
15932
+ if (value === 0) return "0 MB";
15933
+ if (value < 1024) return `${value.toFixed(2)} MB`;
15934
+ return `${(value / 1024).toFixed(2)} GB`;
15935
+ }
15936
+ function formatCpu(value) {
15937
+ if (value === 0) return "0";
15938
+ if (value < 1e-4) return value.toExponential(2);
15939
+ if (value < .01) return value.toFixed(6);
15940
+ if (value < 1) return value.toFixed(4);
15941
+ return value.toFixed(2);
15942
+ }
15943
+ function formatByChartId(value, chartId) {
15944
+ if (chartId.includes("RX") || chartId.includes("TX")) return formatBandwidth(value);
15945
+ if (chartId.includes("Memory")) return formatMemory(value);
15946
+ if (chartId.includes("CPU")) return formatCpu(value);
15947
+ return value.toString();
15948
+ }
15949
+ function formatByLabel(value, label, chartId) {
15950
+ const lowerLabel = label?.toLowerCase();
15951
+ if (lowerLabel?.includes("cpu")) return formatCpu(value);
15952
+ if (lowerLabel?.includes("memory")) return formatMemory(value);
15953
+ if (lowerLabel?.includes("bandwidth") || chartId.includes("RX") || chartId.includes("TX")) return formatBandwidth(value);
15954
+ return `${value}`;
15955
+ }
15956
+ function buildChartOptions(detailChart, chartId, yMax) {
15957
+ return {
15958
+ responsive: true,
15959
+ maintainAspectRatio: false,
15960
+ animation: false,
15961
+ animations: {
15962
+ colors: false,
15963
+ x: false
15964
+ },
15965
+ transitions: { active: { animation: { duration: 0 } } },
15966
+ interaction: {
15967
+ intersect: false,
15968
+ mode: "index"
15969
+ },
15970
+ plugins: {
15971
+ legend: {
15972
+ display: detailChart,
15973
+ position: "bottom",
15974
+ labels: {
15975
+ usePointStyle: true,
15976
+ padding: 15,
15977
+ font: { size: 12 }
15978
+ }
15979
+ },
15980
+ tooltip: {
15981
+ enabled: detailChart,
15982
+ backgroundColor: "rgba(0, 0, 0, 0.8)",
15983
+ titleColor: "#ffffff",
15984
+ bodyColor: "#ffffff",
15985
+ borderColor: "#374151",
15986
+ borderWidth: 1,
15987
+ cornerRadius: 8,
15988
+ displayColors: true,
15989
+ callbacks: { label: (context) => {
15990
+ const value = context.parsed.y ?? 0;
15991
+ const label = context.dataset.label;
15992
+ return `${label}: ${formatByLabel(value, label, chartId)}`;
15993
+ } }
15994
+ }
15995
+ },
15996
+ scales: {
15997
+ x: {
15998
+ display: detailChart,
15999
+ grid: {
16000
+ display: detailChart,
16001
+ color: "rgba(0, 0, 0, 0.1)"
16002
+ },
16003
+ ticks: {
16004
+ maxTicksLimit: 8,
16005
+ font: { size: 11 },
16006
+ color: "#6B7280"
16007
+ }
16008
+ },
16009
+ y: {
16010
+ display: detailChart,
16011
+ beginAtZero: true,
16012
+ max: yMax,
16013
+ suggestedMax: yMax,
16014
+ grid: {
16015
+ display: detailChart,
16016
+ color: "rgba(0, 0, 0, 0.1)"
16017
+ },
16018
+ ticks: {
16019
+ maxTicksLimit: 5,
16020
+ font: { size: 11 },
16021
+ color: "#6B7280",
16022
+ callback: (value) => formatByChartId(Number(value), chartId)
16023
+ }
16024
+ }
16025
+ }
16026
+ };
16027
+ }
16028
+ var UsageChart = class UsageChart extends LitElement {
16029
+ constructor(..._args) {
16030
+ super(..._args);
16031
+ this.chartType = "line";
16032
+ this.labels = [];
16033
+ this.data = {};
16034
+ this.chartId = "";
16035
+ this.detailChart = false;
16036
+ this.isFullScreen = false;
16037
+ this.yAxisMax = null;
16038
+ }
16039
+ get _resolvedHeight() {
16040
+ if (this.isFullScreen) return "90%";
16041
+ if (this.detailChart) return "12rem";
16042
+ return this.height ?? "4rem";
16043
+ }
16044
+ render() {
16045
+ const datasets = buildDatasets(this.data, this.detailChart);
16046
+ const yMax = computeYMax(this.data, this.detailChart, this.yAxisMax);
16047
+ const options = buildChartOptions(this.detailChart, this.chartId, yMax);
16048
+ return html`
16049
+ <table-chart
16050
+ chartType=${this.chartType}
16051
+ chartId=${this.chartId}
16052
+ .chartLabels=${this.labels}
16053
+ .chartDatasets=${datasets}
16054
+ .chartOptions=${options}
16055
+ height=${this._resolvedHeight}
16056
+ ></table-chart>
16057
+ `;
16058
+ }
16059
+ };
16060
+ __decorate([property({ type: String })], UsageChart.prototype, "chartType", void 0);
16061
+ __decorate([property({ type: Array })], UsageChart.prototype, "labels", void 0);
16062
+ __decorate([property({ type: Object })], UsageChart.prototype, "data", void 0);
16063
+ __decorate([property({ type: String })], UsageChart.prototype, "chartId", void 0);
16064
+ __decorate([property({ type: Boolean })], UsageChart.prototype, "detailChart", void 0);
16065
+ __decorate([property({ type: Boolean })], UsageChart.prototype, "isFullScreen", void 0);
16066
+ __decorate([property({ type: Number })], UsageChart.prototype, "yAxisMax", void 0);
16067
+ __decorate([property({ type: String })], UsageChart.prototype, "height", void 0);
16068
+ UsageChart = __decorate([customElement("usage-chart")], UsageChart);
16069
+ //#endregion
16070
+ export { AxebowActionsFooter, AxebowAdjustmentResourcesCounter, AxebowAlert, AxebowBadge, AxebowBanner, AxebowBaseCard, AxebowBorderContainer, AxebowBoxSection, AxebowBoxedInput, AxebowBreadcrumbHeader, AxebowButton, AxebowCallToActionFeature, AxebowCallToActionRow, AxebowCardActionBanner, AxebowCardAttentionBanner, AxebowCardCloudLogo, AxebowCardFilter, AxebowCardFilterItem, AxebowCardFooter, AxebowCardHeader, AxebowCardResourceRow, AxebowCardResourceTable, AxebowCardSpecialLink, AxebowCardStatItem, AxebowCardStatsRow, AxebowCardStatus, AxebowCardTableHeader, AxebowCardVersionSelector, AxebowCarousel, AxebowCarouselInput, AxebowCarouselSelectorItem, AxebowCarouselSelectorTenant, AxebowChannelConfigPanel, AxebowCheckboxInput, AxebowCollaboratorsDialog, AxebowCopyBox, AxebowCopyIcon, AxebowCtaDialog, AxebowDeleteDataPopup, AxebowDeployCard, AxebowDeploySummary, AxebowDialog, AxebowDivider, AxebowDragDropUploadFile, AxebowDraggableService, AxebowEmptyState, AxebowExpandableCard, AxebowExpandableHeader, AxebowFilterBar, AxebowFooter, AxebowFormPanelField, AxebowGettingStartedCard, AxebowGraph, AxebowHeader, AxebowHelpBubble, AxebowIcon, AxebowInfrastructureCard, AxebowInput, AxebowInputBase, AxebowInstancesTable, AxebowLearningCenter, AxebowLimitsCounter, AxebowManageHyperlinks, AxebowMarketplaceCard, AxebowMobileWarningBanner, AxebowModal, AxebowModalsConfirmation, AxebowMoreActions, AxebowNumberCard, AxebowNumbersSection, AxebowNumericInput, AxebowObservabilityContainer, AxebowPageActions, AxebowPaginatedTable, AxebowPemDialog, AxebowPill, AxebowPlanProvidersModal, AxebowPlanSelectField, AxebowPremiumPlanPopup, AxebowProgressBar, AxebowProvidersInput, AxebowQuickTipButton, AxebowQuickTipSection, AxebowRefreshPeriodPanel, AxebowRegistrySelector, AxebowResourceBar, AxebowResourceBoxForm, AxebowResourceCard, AxebowResourceLimitInput, AxebowResourceLimitsPanel, AxebowResourcesCounter, AxebowRoleCard, AxebowRoleContainerDropdown, AxebowRoleTooltip, AxebowRuntimeZipDialog, AxebowSearch, AxebowSearchBarFilters, AxebowSelectInput, AxebowSelectInputWithDivider, AxebowSelectorCard, AxebowSelectorSlider, AxebowServiceDetailHeader, AxebowServicesPanel, AxebowSidebar, AxebowStatus, AxebowStepHeader, AxebowSummaryCard, AxebowSummaryFlavors, AxebowSummaryKeyValue, AxebowSummaryLimits, AxebowSummaryStep, AxebowSummaryStepHeader, AxebowSwitch, AxebowSwitchInput, AxebowTabSelector, AxebowTabsSubmenu, AxebowTagsInput, AxebowTenantCard, AxebowTenantResourceTable, AxebowTenantsTable, AxebowTextInput, AxebowTimeRangePanel, AxebowTooltip, AxebowUl, AxebowUndeployCard, AxebowUnderlineTabSelector, AxebowUsageTooltip, CRITICALITY_STYLES, CustomHomePageBody, DEFAULT_ADD_DIALOG_LABELS, DEFAULT_LOW_NOTE_TEXT, DeployModalComponent, DeployModalFooter, DeployModalHeader, DeployPageBody, STATUS_COLORS, TableChart, UsageChart, WizardPageLayout, axebowTheme, buildAddButton, buildCtaButtons, buildExternalNodeContent, buildMainNodeContent, createElement, createIcon, getCtaBadgeLabel, getCtaDescription, getCtaHeading, getHighestCriticality, groupCallToActionNotifications };
15865
16071
 
15866
16072
  //# sourceMappingURL=index.js.map