@terreno/ui 57.8.0 → 57.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- 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/Button.d.ts.map +1 -1
- package/dist/Button.js +19 -4
- package/dist/Button.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 +147 -6
- 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/DateTimeField.d.ts.map +1 -1
- package/dist/DateTimeField.js +90 -17
- package/dist/DateTimeField.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 +15 -1
- package/dist/FilePickerButton.d.ts.map +1 -1
- package/dist/FilePickerButton.js +90 -13
- package/dist/FilePickerButton.js.map +1 -1
- package/dist/GPTChat.d.ts +57 -1
- package/dist/GPTChat.d.ts.map +1 -1
- package/dist/GPTChat.js +301 -20
- package/dist/GPTChat.js.map +1 -1
- package/dist/HtmlFrame.d.ts +11 -0
- package/dist/HtmlFrame.d.ts.map +1 -0
- package/dist/HtmlFrame.js +29 -0
- package/dist/HtmlFrame.js.map +1 -0
- 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/Text.d.ts +1 -1
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +2 -2
- package/dist/Text.js.map +1 -1
- 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/asks/AskCard.d.ts +34 -0
- package/dist/asks/AskCard.d.ts.map +1 -0
- package/dist/asks/AskCard.js +91 -0
- package/dist/asks/AskCard.js.map +1 -0
- package/dist/asks/AskChoice.d.ts +11 -0
- package/dist/asks/AskChoice.d.ts.map +1 -0
- package/dist/asks/AskChoice.js +146 -0
- package/dist/asks/AskChoice.js.map +1 -0
- package/dist/asks/AskConfirm.d.ts +15 -0
- package/dist/asks/AskConfirm.d.ts.map +1 -0
- package/dist/asks/AskConfirm.js +17 -0
- package/dist/asks/AskConfirm.js.map +1 -0
- package/dist/asks/AskFiles.d.ts +18 -0
- package/dist/asks/AskFiles.d.ts.map +1 -0
- package/dist/asks/AskFiles.js +149 -0
- package/dist/asks/AskFiles.js.map +1 -0
- package/dist/asks/AskForm.d.ts +27 -0
- package/dist/asks/AskForm.d.ts.map +1 -0
- package/dist/asks/AskForm.js +146 -0
- package/dist/asks/AskForm.js.map +1 -0
- package/dist/asks/AskMarkdown.d.ts +25 -0
- package/dist/asks/AskMarkdown.d.ts.map +1 -0
- package/dist/asks/AskMarkdown.js +73 -0
- package/dist/asks/AskMarkdown.js.map +1 -0
- package/dist/asks/SimpleAskCard.d.ts +23 -0
- package/dist/asks/SimpleAskCard.d.ts.map +1 -0
- package/dist/asks/SimpleAskCard.js +32 -0
- package/dist/asks/SimpleAskCard.js.map +1 -0
- package/dist/asks/askControls.d.ts +33 -0
- package/dist/asks/askControls.d.ts.map +1 -0
- package/dist/asks/askControls.js +30 -0
- package/dist/asks/askControls.js.map +1 -0
- package/dist/asks/askFileRefs.d.ts +26 -0
- package/dist/asks/askFileRefs.d.ts.map +1 -0
- package/dist/asks/askFileRefs.js +75 -0
- package/dist/asks/askFileRefs.js.map +1 -0
- package/dist/asks/askFormDraft.d.ts +60 -0
- package/dist/asks/askFormDraft.d.ts.map +1 -0
- package/dist/asks/askFormDraft.js +224 -0
- package/dist/asks/askFormDraft.js.map +1 -0
- package/dist/asks/askSummary.d.ts +10 -0
- package/dist/asks/askSummary.d.ts.map +1 -0
- package/dist/asks/askSummary.js +138 -0
- package/dist/asks/askSummary.js.map +1 -0
- package/dist/asks/askTypes.d.ts +21 -0
- package/dist/asks/askTypes.d.ts.map +1 -0
- package/dist/asks/askTypes.js +2 -0
- package/dist/asks/askTypes.js.map +1 -0
- package/dist/asks/simpleCardButtonVariants.d.ts +5 -0
- package/dist/asks/simpleCardButtonVariants.d.ts.map +1 -0
- package/dist/asks/simpleCardButtonVariants.js +8 -0
- package/dist/asks/simpleCardButtonVariants.js.map +1 -0
- package/dist/blocks/BlocksError.d.ts +8 -0
- package/dist/blocks/BlocksError.d.ts.map +1 -0
- package/dist/blocks/BlocksError.js +14 -0
- package/dist/blocks/BlocksError.js.map +1 -0
- package/dist/blocks/BlocksView.d.ts +10 -0
- package/dist/blocks/BlocksView.d.ts.map +1 -0
- package/dist/blocks/BlocksView.js +90 -0
- package/dist/blocks/BlocksView.js.map +1 -0
- package/dist/blocks/blockRenderers.d.ts +25 -0
- package/dist/blocks/blockRenderers.d.ts.map +1 -0
- package/dist/blocks/blockRenderers.js +136 -0
- package/dist/blocks/blockRenderers.js.map +1 -0
- package/dist/blocks/datasetToPoints.d.ts +22 -0
- package/dist/blocks/datasetToPoints.d.ts.map +1 -0
- package/dist/blocks/datasetToPoints.js +28 -0
- package/dist/blocks/datasetToPoints.js.map +1 -0
- package/dist/blocks/useBlockSelections.d.ts +6 -0
- package/dist/blocks/useBlockSelections.d.ts.map +1 -0
- package/dist/blocks/useBlockSelections.js +10 -0
- package/dist/blocks/useBlockSelections.js.map +1 -0
- package/dist/blocks/useResolvedDatasets.d.ts +18 -0
- package/dist/blocks/useResolvedDatasets.d.ts.map +1 -0
- package/dist/blocks/useResolvedDatasets.js +59 -0
- package/dist/blocks/useResolvedDatasets.js.map +1 -0
- package/dist/blocks/useResolvedImages.d.ts +15 -0
- package/dist/blocks/useResolvedImages.d.ts.map +1 -0
- package/dist/blocks/useResolvedImages.js +66 -0
- package/dist/blocks/useResolvedImages.js.map +1 -0
- 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 +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts +15 -0
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.js +10 -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 +2 -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/Button.test.tsx +72 -0
- package/src/Button.tsx +34 -4
- package/src/ChartCard.test.tsx +79 -0
- package/src/ChartCard.tsx +80 -0
- package/src/Common.ts +136 -2
- package/src/DashboardGrid.test.tsx +98 -1
- package/src/DashboardGrid.tsx +71 -20
- package/src/DateTimeField.test.tsx +185 -2
- package/src/DateTimeField.tsx +106 -16
- package/src/DonutChart.test.tsx +78 -10
- package/src/DonutChart.tsx +87 -14
- package/src/DropdownMenuItem.tsx +48 -0
- package/src/FilePickerButton.test.tsx +116 -9
- package/src/FilePickerButton.tsx +177 -23
- package/src/GPTChat.test.tsx +891 -8
- package/src/GPTChat.tsx +713 -45
- package/src/HtmlFrame.tsx +60 -0
- package/src/LineChart.test.tsx +109 -10
- 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/Text.test.tsx +22 -0
- package/src/Text.tsx +10 -1
- 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/asks/AskCard.test.tsx +1428 -0
- package/src/asks/AskCard.tsx +240 -0
- package/src/asks/AskChoice.tsx +368 -0
- package/src/asks/AskConfirm.tsx +42 -0
- package/src/asks/AskFiles.test.tsx +347 -0
- package/src/asks/AskFiles.tsx +246 -0
- package/src/asks/AskForm.tsx +334 -0
- package/src/asks/AskMarkdown.tsx +176 -0
- package/src/asks/SimpleAskCard.test.tsx +253 -0
- package/src/asks/SimpleAskCard.tsx +82 -0
- package/src/asks/askControls.tsx +98 -0
- package/src/asks/askFileRefs.test.ts +155 -0
- package/src/asks/askFileRefs.ts +98 -0
- package/src/asks/askFormDraft.test.ts +347 -0
- package/src/asks/askFormDraft.ts +309 -0
- package/src/asks/askSummary.test.ts +255 -0
- package/src/asks/askSummary.ts +160 -0
- package/src/asks/askTypes.ts +25 -0
- package/src/asks/asksUseTerrenoComponents.test.ts +55 -0
- package/src/asks/simpleCardButtonVariants.ts +14 -0
- package/src/blocks/BlocksError.tsx +28 -0
- package/src/blocks/BlocksView.test.tsx +607 -0
- package/src/blocks/BlocksView.tsx +125 -0
- package/src/blocks/blockRenderers.tsx +288 -0
- package/src/blocks/datasetToPoints.test.ts +31 -0
- package/src/blocks/datasetToPoints.ts +48 -0
- package/src/blocks/useBlockSelections.ts +13 -0
- package/src/blocks/useResolvedDatasets.ts +78 -0
- package/src/blocks/useResolvedImages.ts +81 -0
- 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 +13 -0
- package/src/isolated/HtmlFrame.isolated.tsx +54 -0
- package/src/lazyBoundaries/heavyOptionalExports.test.tsx +2 -0
- package/src/lazyBoundaries/heavyOptionalExports.tsx +35 -0
- package/src/resolveDocumentBodyPortalTarget.ts +11 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type {FC, ReactNode} from "react";
|
|
2
|
+
|
|
3
|
+
import {ChartCard} from "../ChartCard";
|
|
4
|
+
import {resolveTestID} from "../testing/resolveTestId";
|
|
5
|
+
|
|
6
|
+
export interface ChartFacadeContainerProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
onPeriodPress?: () => void;
|
|
9
|
+
periodLabel?: string;
|
|
10
|
+
testID?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ChartFacadeContainer: FC<ChartFacadeContainerProps> = ({
|
|
15
|
+
children,
|
|
16
|
+
onPeriodPress,
|
|
17
|
+
periodLabel,
|
|
18
|
+
testID,
|
|
19
|
+
title,
|
|
20
|
+
}) => {
|
|
21
|
+
if (!title) {
|
|
22
|
+
return children;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<ChartCard
|
|
27
|
+
onPeriodPress={onPeriodPress}
|
|
28
|
+
periodLabel={periodLabel}
|
|
29
|
+
testID={resolveTestID(testID, "card")}
|
|
30
|
+
title={title}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</ChartCard>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -11,6 +11,7 @@ export interface ChartFrameProps {
|
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
emptyText: string;
|
|
13
13
|
isEmpty: boolean;
|
|
14
|
+
legendItems?: Array<{color: string; label: string}>;
|
|
14
15
|
legendLabel?: string;
|
|
15
16
|
loading?: boolean;
|
|
16
17
|
testID?: string;
|
|
@@ -22,6 +23,7 @@ export const ChartFrame: FC<ChartFrameProps> = ({
|
|
|
22
23
|
children,
|
|
23
24
|
emptyText,
|
|
24
25
|
isEmpty,
|
|
26
|
+
legendItems,
|
|
25
27
|
legendLabel,
|
|
26
28
|
loading = false,
|
|
27
29
|
testID,
|
|
@@ -55,7 +57,43 @@ export const ChartFrame: FC<ChartFrameProps> = ({
|
|
|
55
57
|
) : null}
|
|
56
58
|
</Box>
|
|
57
59
|
) : null}
|
|
58
|
-
{showPlot &&
|
|
60
|
+
{showPlot && legendItems && legendItems.length > 0 ? (
|
|
61
|
+
<Box
|
|
62
|
+
direction="row"
|
|
63
|
+
gap={3}
|
|
64
|
+
height={CHART_FOOTER_ROW_HEIGHT}
|
|
65
|
+
minWidth={0}
|
|
66
|
+
overflow="hidden"
|
|
67
|
+
>
|
|
68
|
+
{legendItems.map((item, index) => (
|
|
69
|
+
<Box
|
|
70
|
+
alignItems="center"
|
|
71
|
+
dangerouslySetInlineStyle={{__style: {flexBasis: 0, flexGrow: 1, flexShrink: 1}}}
|
|
72
|
+
direction="row"
|
|
73
|
+
gap={1}
|
|
74
|
+
key={`${item.label}-${index}`}
|
|
75
|
+
minWidth={0}
|
|
76
|
+
testID={resolveTestID(testID, `legend.${index}.item`)}
|
|
77
|
+
>
|
|
78
|
+
<Box
|
|
79
|
+
dangerouslySetInlineStyle={{
|
|
80
|
+
__style: {backgroundColor: item.color, height: 8, width: 8},
|
|
81
|
+
}}
|
|
82
|
+
testID={resolveTestID(testID, `legend.${index}.swatch`)}
|
|
83
|
+
/>
|
|
84
|
+
<Text
|
|
85
|
+
size="sm"
|
|
86
|
+
skipLinking
|
|
87
|
+
testID={resolveTestID(testID, `legend.${index}`)}
|
|
88
|
+
truncate
|
|
89
|
+
>
|
|
90
|
+
{item.label}
|
|
91
|
+
</Text>
|
|
92
|
+
</Box>
|
|
93
|
+
))}
|
|
94
|
+
</Box>
|
|
95
|
+
) : null}
|
|
96
|
+
{showPlot && (!legendItems || legendItems.length === 0) && legendLabel ? (
|
|
59
97
|
<Box height={CHART_FOOTER_ROW_HEIGHT} minWidth={0} overflow="hidden">
|
|
60
98
|
<Text size="sm" skipLinking testID={resolveTestID(testID, "legend")} truncate>
|
|
61
99
|
{legendLabel}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {describe, expect, it} from "bun:test";
|
|
2
|
+
import {assert} from "chai";
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
CHART_Y_AXIS_MAX_WIDTH,
|
|
@@ -8,6 +9,7 @@ import {
|
|
|
8
9
|
getPlotHeight,
|
|
9
10
|
getXTickStyle,
|
|
10
11
|
getYTickStyle,
|
|
12
|
+
shouldRotateChartXTicks,
|
|
11
13
|
} from "./layout";
|
|
12
14
|
|
|
13
15
|
describe("chart layout", () => {
|
|
@@ -19,8 +21,16 @@ describe("chart layout", () => {
|
|
|
19
21
|
expect(getPlotHeight({hasLegend: true, height: 200})).toBe(146);
|
|
20
22
|
});
|
|
21
23
|
|
|
24
|
+
it("reserves a custom x-axis height for rotated labels", () => {
|
|
25
|
+
assert.equal(getPlotHeight({hasLegend: false, height: 200, xAxisHeight: 72}), 110);
|
|
26
|
+
});
|
|
27
|
+
|
|
22
28
|
it("keeps a drawable plot when the requested height is smaller than the rows", () => {
|
|
23
|
-
expect(getPlotHeight({hasLegend: true, height: 20})).toBe(
|
|
29
|
+
expect(getPlotHeight({hasLegend: true, height: 20})).toBe(1);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("keeps rotated charts inside the requested height", () => {
|
|
33
|
+
assert.equal(getPlotHeight({hasLegend: true, height: 140, xAxisHeight: 72}), 32);
|
|
24
34
|
});
|
|
25
35
|
|
|
26
36
|
it("fits a donut inside the height left by tooltip and padded, gapped legend rows", () => {
|
|
@@ -69,6 +79,17 @@ describe("chart layout", () => {
|
|
|
69
79
|
expect(getXTickStyle({bandwidth: 0, xCenter: 10}).width).toBe(1);
|
|
70
80
|
});
|
|
71
81
|
|
|
82
|
+
it("rotates dense auto ticks but respects explicit policies", () => {
|
|
83
|
+
assert.isFalse(shouldRotateChartXTicks({labelCount: 7, policy: "auto"}));
|
|
84
|
+
assert.isTrue(shouldRotateChartXTicks({labelCount: 8, policy: "auto"}));
|
|
85
|
+
assert.isTrue(shouldRotateChartXTicks({labelCount: 2, policy: "rotate"}));
|
|
86
|
+
assert.isFalse(shouldRotateChartXTicks({labelCount: 20, policy: "truncate"}));
|
|
87
|
+
assert.deepInclude(getXTickStyle({bandwidth: 10, isRotated: true, xCenter: 20}), {
|
|
88
|
+
transform: [{rotate: "45deg"}],
|
|
89
|
+
transformOrigin: "left top",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
72
93
|
it("centers a y tick label on its value and spans the axis gutter", () => {
|
|
73
94
|
expect(getYTickStyle({axisWidth: 40, y: 50})).toEqual({
|
|
74
95
|
left: 0,
|
package/src/charts/layout.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type {ChartPlot} from "./types/chartTypes";
|
|
|
2
2
|
|
|
3
3
|
export const CHART_Y_AXIS_MAX_WIDTH = 40;
|
|
4
4
|
export const CHART_X_AXIS_HEIGHT = 18;
|
|
5
|
+
export const CHART_ROTATED_X_AXIS_HEIGHT = 72;
|
|
5
6
|
export const CHART_FOOTER_ROW_HEIGHT = 18;
|
|
6
7
|
|
|
7
8
|
const Y_AXIS_WIDTH_RATIO = 0.3;
|
|
@@ -39,12 +40,18 @@ export const getChartAxisWidth = (chartWidth: number): number => {
|
|
|
39
40
|
export const getPlotHeight = ({
|
|
40
41
|
hasLegend,
|
|
41
42
|
height,
|
|
43
|
+
xAxisHeight = CHART_X_AXIS_HEIGHT,
|
|
42
44
|
}: {
|
|
43
45
|
hasLegend: boolean;
|
|
44
46
|
height: number;
|
|
47
|
+
xAxisHeight?: number;
|
|
45
48
|
}): number => {
|
|
46
|
-
const footer =
|
|
47
|
-
|
|
49
|
+
const footer = xAxisHeight + CHART_FOOTER_ROW_HEIGHT * (hasLegend ? 2 : 1);
|
|
50
|
+
const remaining = height - footer;
|
|
51
|
+
if (remaining >= MIN_PLOT_HEIGHT) {
|
|
52
|
+
return remaining;
|
|
53
|
+
}
|
|
54
|
+
return Math.max(remaining, 1);
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
export const getDonutSize = ({
|
|
@@ -85,13 +92,39 @@ export const getChartPlot = ({
|
|
|
85
92
|
*/
|
|
86
93
|
export const getXTickStyle = ({
|
|
87
94
|
bandwidth,
|
|
95
|
+
isRotated = false,
|
|
88
96
|
xCenter,
|
|
89
97
|
}: {
|
|
90
98
|
bandwidth: number;
|
|
99
|
+
isRotated?: boolean;
|
|
91
100
|
xCenter: number;
|
|
92
101
|
}): ChartTickStyle => {
|
|
93
|
-
const width =
|
|
94
|
-
|
|
102
|
+
const width = isRotated
|
|
103
|
+
? Math.max(bandwidth * 1.5, CHART_ROTATED_X_AXIS_HEIGHT)
|
|
104
|
+
: Math.max(bandwidth, 1);
|
|
105
|
+
return {
|
|
106
|
+
left: isRotated ? xCenter - bandwidth / 4 : xCenter - width / 2,
|
|
107
|
+
position: "absolute",
|
|
108
|
+
top: 0,
|
|
109
|
+
...(isRotated ? {transform: [{rotate: "45deg"}], transformOrigin: "left top"} : {}),
|
|
110
|
+
width,
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const shouldRotateChartXTicks = ({
|
|
115
|
+
labelCount,
|
|
116
|
+
policy = "auto",
|
|
117
|
+
}: {
|
|
118
|
+
labelCount: number;
|
|
119
|
+
policy?: "auto" | "rotate" | "truncate";
|
|
120
|
+
}): boolean => {
|
|
121
|
+
if (policy === "rotate") {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
if (policy === "truncate") {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
return labelCount > 7;
|
|
95
128
|
};
|
|
96
129
|
|
|
97
130
|
export const getYTickStyle = ({axisWidth, y}: {axisWidth: number; y: number}): ChartTickStyle => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {describe, expect, it} from "bun:test";
|
|
2
|
+
import {assert} from "chai";
|
|
2
3
|
|
|
3
4
|
import {createCartesianScales, getYTickValues} from "./scales";
|
|
4
5
|
import type {ChartPoint} from "./types/chartTypes";
|
|
@@ -27,6 +28,38 @@ describe("createCartesianScales", () => {
|
|
|
27
28
|
expect(scales.y(50)).toBe(50);
|
|
28
29
|
});
|
|
29
30
|
|
|
31
|
+
it("scales a sparkline to the data range instead of forcing zero", () => {
|
|
32
|
+
const points = [
|
|
33
|
+
{label: "A", value: 100},
|
|
34
|
+
{label: "B", value: 110},
|
|
35
|
+
];
|
|
36
|
+
const scales = createCartesianScales({
|
|
37
|
+
includeZero: false,
|
|
38
|
+
plot: PLOT,
|
|
39
|
+
points,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
assert.equal(scales.y(100), 100);
|
|
43
|
+
assert.equal(scales.y(110), 0);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("uses the explicit shared x labels while scaling all series values on y", () => {
|
|
47
|
+
const points = [
|
|
48
|
+
...FIXTURE_POINTS,
|
|
49
|
+
...FIXTURE_POINTS.map((point) => ({...point, value: point.value / 2})),
|
|
50
|
+
];
|
|
51
|
+
const scales = createCartesianScales({
|
|
52
|
+
plot: PLOT,
|
|
53
|
+
points,
|
|
54
|
+
xLabels: FIXTURE_POINTS.map((point) => point.label),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
assert.equal(scales.bandwidth, 30);
|
|
58
|
+
assert.equal(scales.xCenter("C"), 85);
|
|
59
|
+
assert.equal(scales.y(100), 0);
|
|
60
|
+
assert.equal(scales.y(25), 75);
|
|
61
|
+
});
|
|
62
|
+
|
|
30
63
|
it("returns three ticks from the y domain including zero", () => {
|
|
31
64
|
expect(getYTickValues(FIXTURE_POINTS)).toEqual([0, 50, 100]);
|
|
32
65
|
});
|
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
|
@@ -14,6 +14,10 @@ export * from "./AnnouncementScreen";
|
|
|
14
14
|
export type * from "./AreaChart";
|
|
15
15
|
export type * from "./AttachmentPreview";
|
|
16
16
|
export * from "./Avatar";
|
|
17
|
+
export type * from "./asks/AskCard";
|
|
18
|
+
export * from "./asks/askFileRefs";
|
|
19
|
+
export type * from "./asks/askTypes";
|
|
20
|
+
export * from "./asks/SimpleAskCard";
|
|
17
21
|
export * from "./Badge";
|
|
18
22
|
export {Banner, hideBanner} from "./Banner";
|
|
19
23
|
export type * from "./BarChart";
|
|
@@ -22,6 +26,7 @@ export * from "./BooleanField";
|
|
|
22
26
|
export * from "./Box";
|
|
23
27
|
export * from "./Button";
|
|
24
28
|
export * from "./Card";
|
|
29
|
+
export type * from "./ChartCard";
|
|
25
30
|
export * from "./CheckBox";
|
|
26
31
|
export * from "./Common";
|
|
27
32
|
export type * from "./ConflictSheet";
|
|
@@ -57,6 +62,7 @@ export type * from "./GPTMemoryModal";
|
|
|
57
62
|
export * from "./Heading";
|
|
58
63
|
export * from "./HeightActionSheet";
|
|
59
64
|
export * from "./HeightField";
|
|
65
|
+
export * from "./HtmlFrame";
|
|
60
66
|
export * from "./Icon";
|
|
61
67
|
export * from "./IconButton";
|
|
62
68
|
export * from "./IconRegistry";
|
|
@@ -71,8 +77,11 @@ export {
|
|
|
71
77
|
AIRequestExplorer,
|
|
72
78
|
AiSuggestionBox,
|
|
73
79
|
AreaChart,
|
|
80
|
+
AskCard,
|
|
74
81
|
AttachmentPreview,
|
|
75
82
|
BarChart,
|
|
83
|
+
BlocksView,
|
|
84
|
+
ChartCard,
|
|
76
85
|
ConflictSheet,
|
|
77
86
|
ConsentFormScreen,
|
|
78
87
|
ConsentNavigator,
|
|
@@ -84,6 +93,8 @@ export {
|
|
|
84
93
|
LineChart,
|
|
85
94
|
MarkdownEditor,
|
|
86
95
|
MarkdownEditorField,
|
|
96
|
+
Scorecard,
|
|
97
|
+
SparklineChart,
|
|
87
98
|
UpgradeRequiredScreen,
|
|
88
99
|
} from "./lazyBoundaries/heavyOptionalExports";
|
|
89
100
|
export * from "./login/LoginScreen";
|
|
@@ -112,6 +123,7 @@ export * from "./PortalHost";
|
|
|
112
123
|
export * from "./pdfHtmlTemplate";
|
|
113
124
|
export * from "./Radio";
|
|
114
125
|
export * from "./RadioField";
|
|
126
|
+
export type * from "./Scorecard";
|
|
115
127
|
export * from "./ScrollView";
|
|
116
128
|
export * from "./SectionDivider";
|
|
117
129
|
export * from "./SegmentedControl";
|
|
@@ -124,6 +136,7 @@ export * from "./SignatureCaptureField";
|
|
|
124
136
|
export * from "./SignatureField";
|
|
125
137
|
export * from "./Slider";
|
|
126
138
|
export * from "./SocialLoginButton";
|
|
139
|
+
export type * from "./SparklineChart";
|
|
127
140
|
export * from "./Spinner";
|
|
128
141
|
export * from "./SplitPage";
|
|
129
142
|
export * from "./SyncStatusBanner";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {describe, expect, it, mock} from "bun:test";
|
|
2
|
+
import {Platform, View} from "react-native";
|
|
3
|
+
|
|
4
|
+
import {HtmlFrame, htmlFrameSrcDoc} from "../HtmlFrame";
|
|
5
|
+
import {renderWithTheme} from "../test-utils";
|
|
6
|
+
|
|
7
|
+
mock.module("react-native-webview", () => ({
|
|
8
|
+
default: ({
|
|
9
|
+
javaScriptEnabled,
|
|
10
|
+
onShouldStartLoadWithRequest,
|
|
11
|
+
source,
|
|
12
|
+
}: {
|
|
13
|
+
javaScriptEnabled?: boolean;
|
|
14
|
+
onShouldStartLoadWithRequest?: (request: {url: string}) => boolean;
|
|
15
|
+
source?: {html?: string};
|
|
16
|
+
}) => {
|
|
17
|
+
const first = onShouldStartLoadWithRequest?.({url: "about:srcdoc"});
|
|
18
|
+
const second = onShouldStartLoadWithRequest?.({url: "https://evil.test"});
|
|
19
|
+
const startsWithCsp = String(source?.html ?? "").startsWith(
|
|
20
|
+
'<meta http-equiv="Content-Security-Policy"'
|
|
21
|
+
);
|
|
22
|
+
return (
|
|
23
|
+
<View
|
|
24
|
+
accessibilityLabel={`js:${String(javaScriptEnabled)};csp:${String(startsWithCsp)};first:${String(first)};second:${String(second)}`}
|
|
25
|
+
testID="html-frame-webview"
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
describe("HtmlFrame", () => {
|
|
32
|
+
const originalOS = Platform.OS;
|
|
33
|
+
|
|
34
|
+
it("starts the web srcdoc with the CSP meta tag inside an empty sandbox", () => {
|
|
35
|
+
Platform.OS = "web";
|
|
36
|
+
const result = renderWithTheme(<HtmlFrame html="<h1>Invoice</h1>" title="Invoice preview" />);
|
|
37
|
+
const rendered = JSON.stringify(result.toJSON());
|
|
38
|
+
const srcDoc = htmlFrameSrcDoc("<h1>Invoice</h1>");
|
|
39
|
+
expect(result.getByTestId("html-frame-web")).toBeTruthy();
|
|
40
|
+
expect(rendered).toContain('sandbox":""');
|
|
41
|
+
expect(rendered).toContain(JSON.stringify(srcDoc).slice(1, -1));
|
|
42
|
+
expect(rendered.indexOf("Content-Security-Policy")).toBeLessThan(
|
|
43
|
+
rendered.indexOf("<h1>Invoice")
|
|
44
|
+
);
|
|
45
|
+
Platform.OS = originalOS;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("turns JavaScript off and blocks navigation after the first load", () => {
|
|
49
|
+
Platform.OS = "ios";
|
|
50
|
+
const result = renderWithTheme(<HtmlFrame html="<p>Invoice</p>" />);
|
|
51
|
+
expect(result.getByLabelText("js:false;csp:true;first:true;second:false")).toBeTruthy();
|
|
52
|
+
Platform.OS = originalOS;
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -3,6 +3,7 @@ import {describe, expect, it} from "bun:test";
|
|
|
3
3
|
import {Categories} from "../emojiCategories";
|
|
4
4
|
import {
|
|
5
5
|
AIRequestExplorer,
|
|
6
|
+
AskCard,
|
|
6
7
|
DraggableList,
|
|
7
8
|
EmojiSelector,
|
|
8
9
|
heavyOptionalModuleFactories,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
describe("heavyOptionalExports", () => {
|
|
13
14
|
it("exposes lazy placeholders for heavy optional widgets", () => {
|
|
14
15
|
expect(AIRequestExplorer).toBeTruthy();
|
|
16
|
+
expect(AskCard).toBeTruthy();
|
|
15
17
|
expect(DraggableList).toBeTruthy();
|
|
16
18
|
expect(EmojiSelector).toBeTruthy();
|
|
17
19
|
expect(MarkdownEditor).toBeTruthy();
|