@terreno/ui 57.8.0 → 57.9.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/dist/AreaChart.d.ts +1 -1
- package/dist/AreaChart.d.ts.map +1 -1
- package/dist/AreaChart.js +70 -22
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarChart.d.ts.map +1 -1
- package/dist/BarChart.js +55 -13
- package/dist/BarChart.js.map +1 -1
- package/dist/ChartCard.d.ts +5 -0
- package/dist/ChartCard.d.ts.map +1 -0
- package/dist/ChartCard.js +18 -0
- package/dist/ChartCard.js.map +1 -0
- package/dist/Common.d.ts +79 -5
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/DashboardGrid.d.ts +6 -2
- package/dist/DashboardGrid.d.ts.map +1 -1
- package/dist/DashboardGrid.js +43 -10
- package/dist/DashboardGrid.js.map +1 -1
- package/dist/DonutChart.d.ts.map +1 -1
- package/dist/DonutChart.js +20 -10
- package/dist/DonutChart.js.map +1 -1
- package/dist/DropdownMenuItem.d.ts +16 -0
- package/dist/DropdownMenuItem.d.ts.map +1 -0
- package/dist/DropdownMenuItem.js +11 -0
- package/dist/DropdownMenuItem.js.map +1 -0
- package/dist/FilePickerButton.d.ts.map +1 -1
- package/dist/FilePickerButton.js +70 -10
- package/dist/FilePickerButton.js.map +1 -1
- package/dist/GPTChat.d.ts.map +1 -1
- package/dist/GPTChat.js +103 -14
- package/dist/GPTChat.js.map +1 -1
- package/dist/LineChart.d.ts +1 -1
- package/dist/LineChart.d.ts.map +1 -1
- package/dist/LineChart.js +62 -21
- package/dist/LineChart.js.map +1 -1
- package/dist/Scorecard.d.ts +5 -0
- package/dist/Scorecard.d.ts.map +1 -0
- package/dist/Scorecard.js +11 -0
- package/dist/Scorecard.js.map +1 -0
- package/dist/SparklineChart.d.ts +5 -0
- package/dist/SparklineChart.d.ts.map +1 -0
- package/dist/SparklineChart.js +35 -0
- package/dist/SparklineChart.js.map +1 -0
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +12 -4
- package/dist/TextField.js.map +1 -1
- package/dist/ToastNotifications.d.ts.map +1 -1
- package/dist/ToastNotifications.js +29 -6
- package/dist/ToastNotifications.js.map +1 -1
- package/dist/WebDropdownMenu.d.ts +2 -1
- package/dist/WebDropdownMenu.d.ts.map +1 -1
- package/dist/WebDropdownMenu.js +2 -6
- package/dist/WebDropdownMenu.js.map +1 -1
- package/dist/charts/ChartFacadeContainer.d.ts +10 -0
- package/dist/charts/ChartFacadeContainer.d.ts.map +1 -0
- package/dist/charts/ChartFacadeContainer.js +10 -0
- package/dist/charts/ChartFacadeContainer.js.map +1 -0
- package/dist/charts/ChartFrame.d.ts +4 -0
- package/dist/charts/ChartFrame.d.ts.map +1 -1
- package/dist/charts/ChartFrame.js +4 -2
- package/dist/charts/ChartFrame.js.map +1 -1
- package/dist/charts/layout.d.ts +9 -2
- package/dist/charts/layout.d.ts.map +1 -1
- package/dist/charts/layout.js +28 -6
- package/dist/charts/layout.js.map +1 -1
- package/dist/charts/scales.d.ts +3 -1
- package/dist/charts/scales.d.ts.map +1 -1
- package/dist/charts/scales.js +7 -7
- package/dist/charts/scales.js.map +1 -1
- package/dist/charts/series.d.ts +15 -0
- package/dist/charts/series.d.ts.map +1 -0
- package/dist/charts/series.js +19 -0
- package/dist/charts/series.js.map +1 -0
- package/dist/charts/types/chartTypes.d.ts +7 -0
- package/dist/charts/types/chartTypes.d.ts.map +1 -1
- package/dist/dashboardGridLayout.d.ts +6 -0
- package/dist/dashboardGridLayout.d.ts.map +1 -1
- package/dist/dashboardGridLayout.js +19 -3
- package/dist/dashboardGridLayout.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts +9 -0
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.js +6 -0
- package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -1
- package/dist/resolveDocumentBodyPortalTarget.d.ts +7 -0
- package/dist/resolveDocumentBodyPortalTarget.d.ts.map +1 -0
- package/dist/resolveDocumentBodyPortalTarget.js +12 -0
- package/dist/resolveDocumentBodyPortalTarget.js.map +1 -0
- package/package.json +1 -1
- package/src/AIRequestExplorer.test.tsx +2 -2
- package/src/AreaChart.test.tsx +81 -0
- package/src/AreaChart.tsx +171 -62
- package/src/BarChart.test.tsx +119 -0
- package/src/BarChart.tsx +94 -20
- package/src/ChartCard.test.tsx +79 -0
- package/src/ChartCard.tsx +80 -0
- package/src/Common.ts +69 -2
- package/src/DashboardGrid.test.tsx +98 -1
- package/src/DashboardGrid.tsx +71 -20
- package/src/DonutChart.test.tsx +73 -0
- package/src/DonutChart.tsx +87 -14
- package/src/DropdownMenuItem.tsx +48 -0
- package/src/FilePickerButton.test.tsx +60 -6
- package/src/FilePickerButton.tsx +116 -28
- package/src/GPTChat.test.tsx +133 -6
- package/src/GPTChat.tsx +196 -38
- package/src/LineChart.test.tsx +104 -0
- package/src/LineChart.tsx +154 -58
- package/src/Scorecard.test.tsx +65 -0
- package/src/Scorecard.tsx +45 -0
- package/src/SparklineChart.test.tsx +69 -0
- package/src/SparklineChart.tsx +85 -0
- package/src/TextField.test.tsx +16 -0
- package/src/TextField.tsx +13 -3
- package/src/ToastNotifications.tsx +33 -6
- package/src/ToastNotifications.webModal.test.tsx +285 -0
- package/src/WebDropdownMenu.tsx +3 -7
- package/src/bunSetup.ts +1 -0
- package/src/charts/ChartFacadeContainer.tsx +35 -0
- package/src/charts/ChartFrame.tsx +39 -1
- package/src/charts/layout.test.ts +22 -1
- package/src/charts/layout.ts +37 -4
- package/src/charts/scales.test.ts +33 -0
- package/src/charts/scales.ts +10 -6
- package/src/charts/series.ts +43 -0
- package/src/charts/types/chartTypes.ts +8 -0
- package/src/dashboardGridLayout.test.ts +59 -1
- package/src/dashboardGridLayout.ts +30 -3
- package/src/index.tsx +6 -0
- package/src/lazyBoundaries/heavyOptionalExports.tsx +21 -0
- package/src/resolveDocumentBodyPortalTarget.ts +11 -0
package/src/charts/scales.ts
CHANGED
|
@@ -4,14 +4,14 @@ import type {ChartPlot, ChartPoint, ChartScales} from "./types/chartTypes";
|
|
|
4
4
|
|
|
5
5
|
const EMPTY_Y_DOMAIN: [number, number] = [0, 1];
|
|
6
6
|
|
|
7
|
-
const getYDomain = (points: ChartPoint[]): [number, number] => {
|
|
7
|
+
const getYDomain = (points: ChartPoint[], includeZero: boolean): [number, number] => {
|
|
8
8
|
if (points.length === 0) {
|
|
9
9
|
return EMPTY_Y_DOMAIN;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const values = points.map((point) => point.value);
|
|
13
|
-
const min = Math.min(0, ...values);
|
|
14
|
-
const max = Math.max(0, ...values);
|
|
13
|
+
const min = includeZero ? Math.min(0, ...values) : Math.min(...values);
|
|
14
|
+
const max = includeZero ? Math.max(0, ...values) : Math.max(...values);
|
|
15
15
|
if (min === max) {
|
|
16
16
|
return [min, min + 1];
|
|
17
17
|
}
|
|
@@ -24,24 +24,28 @@ export const getYTickValues = (points: ChartPoint[]): number[] => {
|
|
|
24
24
|
return [];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const [min, max] = getYDomain(points);
|
|
27
|
+
const [min, max] = getYDomain(points, true);
|
|
28
28
|
const mid = min + (max - min) / 2;
|
|
29
29
|
return [min, mid, max];
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const createCartesianScales = ({
|
|
33
|
+
includeZero = true,
|
|
33
34
|
plot,
|
|
34
35
|
points,
|
|
36
|
+
xLabels,
|
|
35
37
|
}: {
|
|
38
|
+
includeZero?: boolean;
|
|
36
39
|
plot: ChartPlot;
|
|
37
40
|
points: ChartPoint[];
|
|
41
|
+
xLabels?: string[];
|
|
38
42
|
}): ChartScales => {
|
|
39
43
|
const bottom = plot.top + plot.height;
|
|
40
|
-
const labels = points.map((point) => point.label);
|
|
44
|
+
const labels = xLabels ?? points.map((point) => point.label);
|
|
41
45
|
const xScale = scaleBand<string>()
|
|
42
46
|
.domain(labels)
|
|
43
47
|
.range([plot.left, plot.left + plot.width]);
|
|
44
|
-
const yScale = scaleLinear().domain(getYDomain(points)).range([bottom, plot.top]);
|
|
48
|
+
const yScale = scaleLinear().domain(getYDomain(points, includeZero)).range([bottom, plot.top]);
|
|
45
49
|
const bandwidth = labels.length === 0 ? 0 : xScale.bandwidth();
|
|
46
50
|
|
|
47
51
|
const xStart = (label: string): number => {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type {ChartPoint, ChartSeries} from "./types/chartTypes";
|
|
2
|
+
|
|
3
|
+
export const resolveChartSeries = ({
|
|
4
|
+
data,
|
|
5
|
+
legendLabel,
|
|
6
|
+
series,
|
|
7
|
+
}: {
|
|
8
|
+
data: ChartPoint[];
|
|
9
|
+
legendLabel?: string;
|
|
10
|
+
series?: ChartSeries[];
|
|
11
|
+
}): ChartSeries[] => {
|
|
12
|
+
if (series && series.length > 0) {
|
|
13
|
+
return series;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return [{data, id: "default", label: legendLabel ?? ""}];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getAllSeriesPoints = ({
|
|
20
|
+
comparisonData = [],
|
|
21
|
+
series,
|
|
22
|
+
}: {
|
|
23
|
+
comparisonData?: ChartPoint[];
|
|
24
|
+
series: ChartSeries[];
|
|
25
|
+
}): ChartPoint[] => {
|
|
26
|
+
return [...series.flatMap((entry) => entry.data), ...comparisonData];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const getAxisPoints = ({
|
|
30
|
+
comparisonData = [],
|
|
31
|
+
series,
|
|
32
|
+
}: {
|
|
33
|
+
comparisonData?: ChartPoint[];
|
|
34
|
+
series: ChartSeries[];
|
|
35
|
+
}): ChartPoint[] => {
|
|
36
|
+
const pointsByLabel = new Map<string, ChartPoint>();
|
|
37
|
+
for (const point of getAllSeriesPoints({comparisonData, series})) {
|
|
38
|
+
if (!pointsByLabel.has(point.label)) {
|
|
39
|
+
pointsByLabel.set(point.label, point);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return [...pointsByLabel.values()];
|
|
43
|
+
};
|
|
@@ -4,6 +4,14 @@ export interface ChartPoint {
|
|
|
4
4
|
value: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
export interface ChartSeries {
|
|
8
|
+
color?: string;
|
|
9
|
+
data: ChartPoint[];
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
stroke?: "solid" | "dotted";
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
export interface ChartPlot {
|
|
8
16
|
height: number;
|
|
9
17
|
left: number;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import {afterEach, describe, expect, it} from "bun:test";
|
|
2
|
+
import {assert} from "chai";
|
|
2
3
|
import {Platform} from "react-native";
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getDashboardCellBoxStyle,
|
|
7
|
+
getDashboardCellWidth,
|
|
8
|
+
getDashboardSpanCellBoxStyle,
|
|
9
|
+
} from "./dashboardGridLayout";
|
|
5
10
|
|
|
6
11
|
const originalOS = Platform.OS;
|
|
7
12
|
|
|
@@ -64,6 +69,59 @@ describe("getDashboardCellBoxStyle", () => {
|
|
|
64
69
|
).toBe("calc((100% - 32px) / 3)");
|
|
65
70
|
});
|
|
66
71
|
|
|
72
|
+
it("adds the internal gap when a measured cell spans two columns", () => {
|
|
73
|
+
assert.deepInclude(
|
|
74
|
+
getDashboardSpanCellBoxStyle({
|
|
75
|
+
columnCount: 4,
|
|
76
|
+
gapPx: 16,
|
|
77
|
+
rowWidth: 332,
|
|
78
|
+
span: 2,
|
|
79
|
+
}),
|
|
80
|
+
{width: 156}
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("clamps measured spans to the available columns", () => {
|
|
85
|
+
const fullSpan = getDashboardSpanCellBoxStyle({
|
|
86
|
+
columnCount: 4,
|
|
87
|
+
gapPx: 16,
|
|
88
|
+
rowWidth: 332,
|
|
89
|
+
span: 8,
|
|
90
|
+
});
|
|
91
|
+
assert.equal(fullSpan.width, 328);
|
|
92
|
+
|
|
93
|
+
const minimumSpan = getDashboardSpanCellBoxStyle({
|
|
94
|
+
columnCount: 4,
|
|
95
|
+
gapPx: 16,
|
|
96
|
+
rowWidth: 332,
|
|
97
|
+
span: 0,
|
|
98
|
+
});
|
|
99
|
+
assert.equal(minimumSpan.width, 70);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("uses responsive web calc widths before measurement", () => {
|
|
103
|
+
Platform.OS = "web";
|
|
104
|
+
|
|
105
|
+
assert.equal(
|
|
106
|
+
getDashboardSpanCellBoxStyle({
|
|
107
|
+
columnCount: 4,
|
|
108
|
+
gapPx: 16,
|
|
109
|
+
rowWidth: 0,
|
|
110
|
+
span: 2,
|
|
111
|
+
}).width,
|
|
112
|
+
"calc(((100% - 48px) / 4) * 2 + 16px)"
|
|
113
|
+
);
|
|
114
|
+
assert.equal(
|
|
115
|
+
getDashboardSpanCellBoxStyle({
|
|
116
|
+
columnCount: 4,
|
|
117
|
+
gapPx: 16,
|
|
118
|
+
rowWidth: 0,
|
|
119
|
+
span: 4,
|
|
120
|
+
}).width,
|
|
121
|
+
"100%"
|
|
122
|
+
);
|
|
123
|
+
});
|
|
124
|
+
|
|
67
125
|
it("falls back to a full-width cell on native, which has no calc", () => {
|
|
68
126
|
Platform.OS = "ios";
|
|
69
127
|
|
|
@@ -47,14 +47,41 @@ export const getDashboardCellBoxStyle = ({
|
|
|
47
47
|
gapPx: number;
|
|
48
48
|
rowWidth: number;
|
|
49
49
|
}): DashboardCellStyle => {
|
|
50
|
+
return getDashboardSpanCellBoxStyle({columnCount, gapPx, rowWidth, span: 1});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const getDashboardSpanCellBoxStyle = ({
|
|
54
|
+
columnCount,
|
|
55
|
+
gapPx,
|
|
56
|
+
rowWidth,
|
|
57
|
+
span,
|
|
58
|
+
}: {
|
|
59
|
+
columnCount: number;
|
|
60
|
+
gapPx: number;
|
|
61
|
+
rowWidth: number;
|
|
62
|
+
span: number;
|
|
63
|
+
}): DashboardCellStyle => {
|
|
64
|
+
const safeColumnCount = Math.max(columnCount, 1);
|
|
65
|
+
const safeSpan = Math.min(Math.max(Math.floor(span), 1), safeColumnCount);
|
|
50
66
|
if (rowWidth > 0) {
|
|
51
|
-
const
|
|
67
|
+
const baseWidth = getDashboardCellWidth({
|
|
68
|
+
columnCount: safeColumnCount,
|
|
69
|
+
gapPx,
|
|
70
|
+
rowWidth,
|
|
71
|
+
});
|
|
72
|
+
const width = baseWidth * safeSpan + gapPx * (safeSpan - 1);
|
|
52
73
|
return {flexGrow: 0, flexShrink: 0, maxWidth: width, width};
|
|
53
74
|
}
|
|
54
|
-
if (
|
|
75
|
+
if (safeSpan === safeColumnCount || Platform.OS !== "web") {
|
|
55
76
|
return {flexGrow: 0, flexShrink: 0, maxWidth: "100%", width: "100%"};
|
|
56
77
|
}
|
|
57
78
|
|
|
58
|
-
const
|
|
79
|
+
const gapTotal = gapPx * (safeColumnCount - 1);
|
|
80
|
+
if (safeSpan === 1) {
|
|
81
|
+
const width = `calc((100% - ${gapTotal}px) / ${safeColumnCount})`;
|
|
82
|
+
return {flexGrow: 0, flexShrink: 0, maxWidth: width, width};
|
|
83
|
+
}
|
|
84
|
+
const internalGaps = gapPx * (safeSpan - 1);
|
|
85
|
+
const width = `calc(((100% - ${gapTotal}px) / ${safeColumnCount}) * ${safeSpan} + ${internalGaps}px)`;
|
|
59
86
|
return {flexGrow: 0, flexShrink: 0, maxWidth: width, width};
|
|
60
87
|
};
|
package/src/index.tsx
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./BooleanField";
|
|
|
22
22
|
export * from "./Box";
|
|
23
23
|
export * from "./Button";
|
|
24
24
|
export * from "./Card";
|
|
25
|
+
export type * from "./ChartCard";
|
|
25
26
|
export * from "./CheckBox";
|
|
26
27
|
export * from "./Common";
|
|
27
28
|
export type * from "./ConflictSheet";
|
|
@@ -73,6 +74,7 @@ export {
|
|
|
73
74
|
AreaChart,
|
|
74
75
|
AttachmentPreview,
|
|
75
76
|
BarChart,
|
|
77
|
+
ChartCard,
|
|
76
78
|
ConflictSheet,
|
|
77
79
|
ConsentFormScreen,
|
|
78
80
|
ConsentNavigator,
|
|
@@ -84,6 +86,8 @@ export {
|
|
|
84
86
|
LineChart,
|
|
85
87
|
MarkdownEditor,
|
|
86
88
|
MarkdownEditorField,
|
|
89
|
+
Scorecard,
|
|
90
|
+
SparklineChart,
|
|
87
91
|
UpgradeRequiredScreen,
|
|
88
92
|
} from "./lazyBoundaries/heavyOptionalExports";
|
|
89
93
|
export * from "./login/LoginScreen";
|
|
@@ -112,6 +116,7 @@ export * from "./PortalHost";
|
|
|
112
116
|
export * from "./pdfHtmlTemplate";
|
|
113
117
|
export * from "./Radio";
|
|
114
118
|
export * from "./RadioField";
|
|
119
|
+
export type * from "./Scorecard";
|
|
115
120
|
export * from "./ScrollView";
|
|
116
121
|
export * from "./SectionDivider";
|
|
117
122
|
export * from "./SegmentedControl";
|
|
@@ -124,6 +129,7 @@ export * from "./SignatureCaptureField";
|
|
|
124
129
|
export * from "./SignatureField";
|
|
125
130
|
export * from "./Slider";
|
|
126
131
|
export * from "./SocialLoginButton";
|
|
132
|
+
export type * from "./SparklineChart";
|
|
127
133
|
export * from "./Spinner";
|
|
128
134
|
export * from "./SplitPage";
|
|
129
135
|
export * from "./SyncStatusBanner";
|
|
@@ -3,6 +3,7 @@ import type {AiSuggestionBox as AiSuggestionBoxComponent} from "../AiSuggestionB
|
|
|
3
3
|
import type {AreaChart as AreaChartComponent} from "../AreaChart";
|
|
4
4
|
import type {AttachmentPreview as AttachmentPreviewComponent} from "../AttachmentPreview";
|
|
5
5
|
import type {BarChart as BarChartComponent} from "../BarChart";
|
|
6
|
+
import type {ChartCard as ChartCardComponent} from "../ChartCard";
|
|
6
7
|
import type {ConflictSheet as ConflictSheetComponent} from "../ConflictSheet";
|
|
7
8
|
import type {ConsentFormScreen as ConsentFormScreenComponent} from "../ConsentFormScreen";
|
|
8
9
|
import type {ConsentNavigator as ConsentNavigatorComponent} from "../ConsentNavigator";
|
|
@@ -15,6 +16,8 @@ import type {GPTMemoryModal as GPTMemoryModalComponent} from "../GPTMemoryModal"
|
|
|
15
16
|
import type {LineChart as LineChartComponent} from "../LineChart";
|
|
16
17
|
import type {MarkdownEditor as MarkdownEditorComponent} from "../MarkdownEditor";
|
|
17
18
|
import type {MarkdownEditorField as MarkdownEditorFieldComponent} from "../MarkdownEditorField";
|
|
19
|
+
import type {Scorecard as ScorecardComponent} from "../Scorecard";
|
|
20
|
+
import type {SparklineChart as SparklineChartComponent} from "../SparklineChart";
|
|
18
21
|
import type {UpgradeRequiredScreen as UpgradeRequiredScreenComponent} from "../UpgradeRequiredScreen";
|
|
19
22
|
import {createLazyComponentExport, createLazyNamedExport} from "./createLazyComponentExport";
|
|
20
23
|
|
|
@@ -24,6 +27,7 @@ export const heavyOptionalModuleFactories = {
|
|
|
24
27
|
AreaChart: () => import("../AreaChart"),
|
|
25
28
|
AttachmentPreview: () => import("../AttachmentPreview"),
|
|
26
29
|
BarChart: () => import("../BarChart"),
|
|
30
|
+
ChartCard: () => import("../ChartCard"),
|
|
27
31
|
ConflictSheet: () => import("../ConflictSheet"),
|
|
28
32
|
ConsentFormScreen: () => import("../ConsentFormScreen"),
|
|
29
33
|
ConsentNavigator: () => import("../ConsentNavigator"),
|
|
@@ -35,6 +39,8 @@ export const heavyOptionalModuleFactories = {
|
|
|
35
39
|
LineChart: () => import("../LineChart"),
|
|
36
40
|
MarkdownEditor: () => import("../MarkdownEditor"),
|
|
37
41
|
MarkdownEditorField: () => import("../MarkdownEditorField"),
|
|
42
|
+
Scorecard: () => import("../Scorecard"),
|
|
43
|
+
SparklineChart: () => import("../SparklineChart"),
|
|
38
44
|
UpgradeRequiredScreen: () => import("../UpgradeRequiredScreen"),
|
|
39
45
|
} as const;
|
|
40
46
|
|
|
@@ -74,6 +80,11 @@ export const BarChart = createLazyNamedExport(
|
|
|
74
80
|
"BarChart"
|
|
75
81
|
) as unknown as typeof BarChartComponent;
|
|
76
82
|
|
|
83
|
+
export const ChartCard = createLazyNamedExport(
|
|
84
|
+
heavyOptionalModuleFactories.ChartCard,
|
|
85
|
+
"ChartCard"
|
|
86
|
+
) as unknown as typeof ChartCardComponent;
|
|
87
|
+
|
|
77
88
|
export const ConflictSheet = createLazyNamedExport(
|
|
78
89
|
heavyOptionalModuleFactories.ConflictSheet,
|
|
79
90
|
"ConflictSheet"
|
|
@@ -128,6 +139,16 @@ export const MarkdownEditorField = createLazyNamedExport(
|
|
|
128
139
|
"MarkdownEditorField"
|
|
129
140
|
) as unknown as typeof MarkdownEditorFieldComponent;
|
|
130
141
|
|
|
142
|
+
export const Scorecard = createLazyNamedExport(
|
|
143
|
+
heavyOptionalModuleFactories.Scorecard,
|
|
144
|
+
"Scorecard"
|
|
145
|
+
) as unknown as typeof ScorecardComponent;
|
|
146
|
+
|
|
147
|
+
export const SparklineChart = createLazyNamedExport(
|
|
148
|
+
heavyOptionalModuleFactories.SparklineChart,
|
|
149
|
+
"SparklineChart"
|
|
150
|
+
) as unknown as typeof SparklineChartComponent;
|
|
151
|
+
|
|
131
152
|
export const UpgradeRequiredScreen = createLazyNamedExport(
|
|
132
153
|
heavyOptionalModuleFactories.UpgradeRequiredScreen,
|
|
133
154
|
"UpgradeRequiredScreen"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM node web overlays attach to so they escape ancestor stacking contexts.
|
|
3
|
+
* Returns null when there is no document, or when `document.body` is not an element,
|
|
4
|
+
* so callers render inline instead of calling `createPortal`.
|
|
5
|
+
*/
|
|
6
|
+
export const resolveDocumentBodyPortalTarget = (): HTMLElement | null => {
|
|
7
|
+
if (typeof document === "undefined" || typeof HTMLElement === "undefined") {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return document.body instanceof HTMLElement ? document.body : null;
|
|
11
|
+
};
|