@terreno/ui 57.3.0 → 57.4.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/AnnouncementBanner.d.ts +12 -0
- package/dist/AnnouncementBanner.js +61 -0
- package/dist/AnnouncementBanner.js.map +1 -0
- package/dist/AnnouncementNavigator.d.ts +11 -0
- package/dist/AnnouncementNavigator.js +189 -0
- package/dist/AnnouncementNavigator.js.map +1 -0
- package/dist/AnnouncementScreen.d.ts +12 -0
- package/dist/AnnouncementScreen.js +28 -0
- package/dist/AnnouncementScreen.js.map +1 -0
- package/dist/AreaChart.d.ts +5 -0
- package/dist/AreaChart.js +69 -0
- package/dist/AreaChart.js.map +1 -0
- package/dist/BarChart.d.ts +5 -0
- package/dist/BarChart.js +89 -0
- package/dist/BarChart.js.map +1 -0
- package/dist/Button.js +17 -3
- package/dist/Button.js.map +1 -1
- package/dist/Common.d.ts +96 -0
- package/dist/Common.js.map +1 -1
- package/dist/DashboardGrid.d.ts +4 -0
- package/dist/DashboardGrid.js +38 -0
- package/dist/DashboardGrid.js.map +1 -0
- package/dist/DataTable.js +83 -11
- package/dist/DataTable.js.map +1 -1
- package/dist/DonutChart.d.ts +5 -0
- package/dist/DonutChart.js +84 -0
- package/dist/DonutChart.js.map +1 -0
- package/dist/Filter.js +12 -2
- package/dist/Filter.js.map +1 -1
- package/dist/GPTChat.d.ts +7 -1
- package/dist/GPTChat.js +28 -15
- package/dist/GPTChat.js.map +1 -1
- package/dist/LineChart.d.ts +5 -0
- package/dist/LineChart.js +68 -0
- package/dist/LineChart.js.map +1 -0
- package/dist/MarkdownEmbed.d.ts +6 -0
- package/dist/MarkdownEmbed.js +17 -0
- package/dist/MarkdownEmbed.js.map +1 -0
- package/dist/MarkdownView.js +38 -3
- package/dist/MarkdownView.js.map +1 -1
- package/dist/Modal.js +12 -10
- package/dist/Modal.js.map +1 -1
- package/dist/ModalSheet.d.ts +5 -1
- package/dist/ModalSheet.js +31 -13
- package/dist/ModalSheet.js.map +1 -1
- package/dist/MultiselectField.js +4 -9
- package/dist/MultiselectField.js.map +1 -1
- package/dist/NotificationBell.d.ts +16 -0
- package/dist/NotificationBell.js +15 -0
- package/dist/NotificationBell.js.map +1 -0
- package/dist/NotificationInbox.d.ts +21 -0
- package/dist/NotificationInbox.js +41 -0
- package/dist/NotificationInbox.js.map +1 -0
- package/dist/NotificationPreferences.d.ts +14 -0
- package/dist/NotificationPreferences.js +32 -0
- package/dist/NotificationPreferences.js.map +1 -0
- package/dist/TextField.js +83 -6
- package/dist/TextField.js.map +1 -1
- package/dist/announcementBuildVersion.d.ts +6 -0
- package/dist/announcementBuildVersion.js +21 -0
- package/dist/announcementBuildVersion.js.map +1 -0
- package/dist/announcementFrequency.d.ts +42 -0
- package/dist/announcementFrequency.js +163 -0
- package/dist/announcementFrequency.js.map +1 -0
- package/dist/announcementPlatform.d.ts +2 -0
- package/dist/announcementPlatform.js +11 -0
- package/dist/announcementPlatform.js.map +1 -0
- package/dist/charts/ChartFrame.d.ts +12 -0
- package/dist/charts/ChartFrame.js +13 -0
- package/dist/charts/ChartFrame.js.map +1 -0
- package/dist/charts/bars.d.ts +18 -0
- package/dist/charts/bars.js +29 -0
- package/dist/charts/bars.js.map +1 -0
- package/dist/charts/layout.d.ts +47 -0
- package/dist/charts/layout.js +56 -0
- package/dist/charts/layout.js.map +1 -0
- package/dist/charts/paths.d.ts +31 -0
- package/dist/charts/paths.js +52 -0
- package/dist/charts/paths.js.map +1 -0
- package/dist/charts/scales.d.ts +6 -0
- package/dist/charts/scales.js +43 -0
- package/dist/charts/scales.js.map +1 -0
- package/dist/charts/theme.d.ts +9 -0
- package/dist/charts/theme.js +15 -0
- package/dist/charts/theme.js.map +1 -0
- package/dist/charts/types/chartTypes.d.ts +17 -0
- package/dist/charts/types/chartTypes.js +2 -0
- package/dist/charts/types/chartTypes.js.map +1 -0
- package/dist/dashboardGridLayout.d.ts +22 -0
- package/dist/dashboardGridLayout.js +33 -0
- package/dist/dashboardGridLayout.js.map +1 -0
- package/dist/dataTableFilters.d.ts +33 -0
- package/dist/dataTableFilters.js +221 -0
- package/dist/dataTableFilters.js.map +1 -0
- package/dist/dataTableListQuery.d.ts +42 -0
- package/dist/dataTableListQuery.js +161 -0
- package/dist/dataTableListQuery.js.map +1 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts +12 -0
- package/dist/lazyBoundaries/heavyOptionalExports.js +8 -0
- package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -1
- package/dist/markdownEmbeds.d.ts +6 -0
- package/dist/markdownEmbeds.js +59 -0
- package/dist/markdownEmbeds.js.map +1 -0
- package/dist/testing/resolveTestId.js +2 -1
- package/dist/testing/resolveTestId.js.map +1 -1
- package/dist/testing/types.d.ts +3 -0
- package/dist/textFieldOscillationGuard.d.ts +25 -0
- package/dist/textFieldOscillationGuard.js +41 -0
- package/dist/textFieldOscillationGuard.js.map +1 -0
- package/dist/useAcknowledgeAnnouncement.d.ts +71 -0
- package/dist/useAcknowledgeAnnouncement.js +94 -0
- package/dist/useAcknowledgeAnnouncement.js.map +1 -0
- package/dist/useAnnouncements.d.ts +73 -0
- package/dist/useAnnouncements.js +66 -0
- package/dist/useAnnouncements.js.map +1 -0
- package/package.json +7 -18
- package/src/AnnouncementBanner.test.tsx +267 -0
- package/src/AnnouncementBanner.tsx +128 -0
- package/src/AnnouncementNavigator.test.tsx +759 -0
- package/src/AnnouncementNavigator.tsx +287 -0
- package/src/AnnouncementScreen.test.tsx +97 -0
- package/src/AnnouncementScreen.tsx +70 -0
- package/src/AreaChart.test.tsx +68 -0
- package/src/AreaChart.tsx +194 -0
- package/src/BarChart.test.tsx +96 -0
- package/src/BarChart.tsx +208 -0
- package/src/Button.test.tsx +66 -0
- package/src/Button.tsx +17 -2
- package/src/Common.ts +95 -0
- package/src/ConsentNavigator.test.tsx +55 -0
- package/src/DashboardGrid.test.tsx +75 -0
- package/src/DashboardGrid.tsx +69 -0
- package/src/DataTable.test.tsx +296 -1
- package/src/DataTable.tsx +210 -18
- package/src/DonutChart.test.tsx +121 -0
- package/src/DonutChart.tsx +160 -0
- package/src/EmojiSelector.test.tsx +51 -0
- package/src/Field.test.tsx +18 -0
- package/src/Filter.test.tsx +25 -0
- package/src/Filter.tsx +38 -7
- package/src/GPTChat.test.tsx +107 -0
- package/src/GPTChat.tsx +176 -86
- package/src/LineChart.test.tsx +166 -0
- package/src/LineChart.tsx +190 -0
- package/src/MarkdownEmbed.test.tsx +34 -0
- package/src/MarkdownEmbed.tsx +43 -0
- package/src/MarkdownView.test.tsx +59 -2
- package/src/MarkdownView.tsx +51 -3
- package/src/Modal.test.tsx +107 -14
- package/src/Modal.tsx +20 -8
- package/src/ModalSheet.test.tsx +121 -9
- package/src/ModalSheet.tsx +46 -11
- package/src/MultiselectField.test.tsx +21 -0
- package/src/MultiselectField.tsx +11 -13
- package/src/NotificationBell.test.tsx +91 -0
- package/src/NotificationBell.tsx +77 -0
- package/src/NotificationInbox.test.tsx +130 -0
- package/src/NotificationInbox.tsx +144 -0
- package/src/NotificationPreferences.test.tsx +25 -0
- package/src/NotificationPreferences.tsx +75 -0
- package/src/RootImportRegression.test.tsx +20 -0
- package/src/TextField.test.tsx +421 -0
- package/src/TextField.tsx +121 -4
- package/src/__snapshots__/Field.test.tsx.snap +22 -0
- package/src/__snapshots__/ModalSheet.test.tsx.snap +4 -1
- package/src/__snapshots__/TextArea.test.tsx.snap +5 -5
- package/src/__snapshots__/TextField.test.tsx.snap +5 -5
- package/src/announcementBuildVersion.test.ts +43 -0
- package/src/announcementBuildVersion.ts +21 -0
- package/src/announcementFrequency.test.ts +245 -0
- package/src/announcementFrequency.ts +246 -0
- package/src/announcementPlatform.test.ts +27 -0
- package/src/announcementPlatform.ts +13 -0
- package/src/charts/ChartFrame.tsx +67 -0
- package/src/charts/bars.test.ts +56 -0
- package/src/charts/bars.ts +53 -0
- package/src/charts/layout.test.ts +80 -0
- package/src/charts/layout.ts +99 -0
- package/src/charts/paths.test.ts +79 -0
- package/src/charts/paths.ts +100 -0
- package/src/charts/scales.test.ts +59 -0
- package/src/charts/scales.ts +60 -0
- package/src/charts/theme.test.ts +22 -0
- package/src/charts/theme.ts +24 -0
- package/src/charts/types/chartTypes.ts +19 -0
- package/src/dashboardGridLayout.test.ts +90 -0
- package/src/dashboardGridLayout.ts +60 -0
- package/src/dataTableFilters.test.tsx +552 -0
- package/src/dataTableFilters.tsx +441 -0
- package/src/dataTableListQuery.test.ts +220 -0
- package/src/dataTableListQuery.ts +201 -0
- package/src/index.tsx +21 -1
- package/src/lazyBoundaries/heavyOptionalExports.tsx +28 -0
- package/src/login/__snapshots__/LoginScreen.test.tsx.snap +22 -0
- package/src/markdownEmbeds.test.ts +53 -0
- package/src/markdownEmbeds.ts +62 -0
- package/src/pdfHtmlTemplate.test.ts +119 -0
- package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +22 -0
- package/src/testing/resolveTestId.test.ts +3 -0
- package/src/testing/resolveTestId.ts +1 -0
- package/src/testing/types.ts +3 -0
- package/src/textFieldOscillationGuard.test.ts +63 -0
- package/src/textFieldOscillationGuard.ts +89 -0
- package/src/types/react-native-markdown-display.d.ts +6 -0
- package/src/types/react-native-swiper-flatlist.d.ts +5 -5
- package/src/useAcknowledgeAnnouncement.test.ts +223 -0
- package/src/useAcknowledgeAnnouncement.ts +166 -0
- package/src/useAnnouncements.test.ts +226 -0
- package/src/useAnnouncements.ts +150 -0
package/src/Common.ts
CHANGED
|
@@ -493,8 +493,17 @@ export interface FilterProps extends WithTestID {
|
|
|
493
493
|
children: React.ReactNode;
|
|
494
494
|
/** Trigger button label. */
|
|
495
495
|
label?: string;
|
|
496
|
+
/** Accessible name when the visible trigger label is empty or abbreviated. */
|
|
497
|
+
triggerAccessibilityLabel?: string;
|
|
496
498
|
/** Trigger button icon. Defaults to the built-in `bars-filter` glyph. */
|
|
497
499
|
iconName?: IconName;
|
|
500
|
+
/**
|
|
501
|
+
* Render the trigger as a compact `IconButton` instead of a labeled button.
|
|
502
|
+
* Use for dense chrome such as table column headers. `label` is ignored.
|
|
503
|
+
*/
|
|
504
|
+
iconOnly?: boolean;
|
|
505
|
+
/** Trigger size when `iconOnly` is set. Defaults to `sm`. */
|
|
506
|
+
triggerSize?: "sm" | "default";
|
|
498
507
|
/** Controlled open state. Omit to use `defaultOpen`. */
|
|
499
508
|
isOpen?: boolean;
|
|
500
509
|
/** Initial open state when uncontrolled. */
|
|
@@ -935,6 +944,13 @@ export interface AiSuggestionProps {
|
|
|
935
944
|
export interface TextFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
|
|
936
945
|
type?: "email" | "password" | "phoneNumber" | "search" | "text" | "url";
|
|
937
946
|
|
|
947
|
+
/**
|
|
948
|
+
* Renders the show/hide eye control on `type="password"`. Set to `false` for fields where
|
|
949
|
+
* revealing the value is not acceptable, such as a shared or on-camera screen.
|
|
950
|
+
* @default true
|
|
951
|
+
*/
|
|
952
|
+
showVisibilityToggle?: boolean;
|
|
953
|
+
|
|
938
954
|
autoComplete?: "current-password" | "on" | "off" | "username";
|
|
939
955
|
returnKeyType?: "done" | "go" | "next" | "search" | "send";
|
|
940
956
|
|
|
@@ -1892,6 +1908,8 @@ export interface BodyProps {
|
|
|
1892
1908
|
export type ButtonPressAnimation = "scale" | "opacity" | "none";
|
|
1893
1909
|
|
|
1894
1910
|
export interface ButtonProps extends WithTestID {
|
|
1911
|
+
/** Accessible name. Defaults to `text`. */
|
|
1912
|
+
accessibilityLabel?: string;
|
|
1895
1913
|
/**
|
|
1896
1914
|
* The text content of the confirmation modal.
|
|
1897
1915
|
* @default "Are you sure you want to continue?"
|
|
@@ -1956,6 +1974,12 @@ export interface ButtonProps extends WithTestID {
|
|
|
1956
1974
|
* @default "default"
|
|
1957
1975
|
*/
|
|
1958
1976
|
size?: "default" | "sm";
|
|
1977
|
+
/**
|
|
1978
|
+
* Controls the button's interaction state. Use Default for standard button appearance
|
|
1979
|
+
* and Active to indicate a selected or currently engaged state.
|
|
1980
|
+
* @default "default"
|
|
1981
|
+
*/
|
|
1982
|
+
state?: "default" | "active";
|
|
1959
1983
|
/**
|
|
1960
1984
|
* The type of the button, which determines its style.
|
|
1961
1985
|
* @default "primary"
|
|
@@ -2619,6 +2643,35 @@ export interface PaginationProps extends WithTestID {
|
|
|
2619
2643
|
totalPages: number;
|
|
2620
2644
|
}
|
|
2621
2645
|
|
|
2646
|
+
export interface LineChartProps extends WithTestID {
|
|
2647
|
+
/** Summary announced for the whole chart. */
|
|
2648
|
+
accessibilityLabel?: string;
|
|
2649
|
+
/** Single series of labeled numeric points. */
|
|
2650
|
+
data: Array<{color?: string; label: string; value: number}>;
|
|
2651
|
+
/** Copy shown when `data` is empty. */
|
|
2652
|
+
emptyText?: string;
|
|
2653
|
+
/** Formats the numeric value in tooltips. */
|
|
2654
|
+
formatValue?: (value: number) => string;
|
|
2655
|
+
/** Plot height in pixels. */
|
|
2656
|
+
height?: number;
|
|
2657
|
+
/** Series name shown under the plot. */
|
|
2658
|
+
legendLabel?: string;
|
|
2659
|
+
/** When true, shows a spinner instead of the plot. */
|
|
2660
|
+
loading?: boolean;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
export interface AreaChartProps extends LineChartProps {}
|
|
2664
|
+
export interface BarChartProps extends LineChartProps {}
|
|
2665
|
+
|
|
2666
|
+
export interface DonutChartProps extends LineChartProps {}
|
|
2667
|
+
|
|
2668
|
+
export interface DashboardGridProps extends WithTestID {
|
|
2669
|
+
children?: React.ReactNode;
|
|
2670
|
+
/** Column counts by breakpoint. Defaults to `{sm: 1, md: 2, lg: 3}`. */
|
|
2671
|
+
columns?: {lg: number; md: number; sm: number};
|
|
2672
|
+
gap?: UnsignedUpTo12;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2622
2675
|
/**
|
|
2623
2676
|
* Data Table
|
|
2624
2677
|
*/
|
|
@@ -2632,6 +2685,33 @@ export type DataTableCustomComponentMap = Record<
|
|
|
2632
2685
|
string,
|
|
2633
2686
|
React.ComponentType<{column: DataTableColumn; cellData: DataTableCellData}>
|
|
2634
2687
|
>;
|
|
2688
|
+
|
|
2689
|
+
export interface DataTableColumnFilterChoiceOption {
|
|
2690
|
+
label: string;
|
|
2691
|
+
value: string;
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
export interface DataTableColumnFilterRenderArgs {
|
|
2695
|
+
field: string;
|
|
2696
|
+
onChange: (value: unknown) => void;
|
|
2697
|
+
value: unknown;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
export interface DataTableColumnFilter {
|
|
2701
|
+
field: string;
|
|
2702
|
+
kind: "text" | "boolean" | "numberRange" | "dateRange" | "choice";
|
|
2703
|
+
label?: string;
|
|
2704
|
+
/** When true, choice filters include an Empty option for null/unset field values. */
|
|
2705
|
+
allowEmpty?: boolean;
|
|
2706
|
+
options?: DataTableColumnFilterChoiceOption[];
|
|
2707
|
+
renderFilter?: (args: DataTableColumnFilterRenderArgs) => React.ReactNode;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
export interface DataTableQueryParams {
|
|
2711
|
+
[field: string]: unknown;
|
|
2712
|
+
$or?: Array<Record<string, unknown>>;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2635
2715
|
export interface DataTableColumn {
|
|
2636
2716
|
title: string;
|
|
2637
2717
|
columnType: "text" | "number" | "date" | "boolean" | string;
|
|
@@ -2639,12 +2719,17 @@ export interface DataTableColumn {
|
|
|
2639
2719
|
highlight?: SurfaceColor;
|
|
2640
2720
|
sortable?: boolean;
|
|
2641
2721
|
infoModalText?: string;
|
|
2722
|
+
filter?: DataTableColumnFilter;
|
|
2642
2723
|
}
|
|
2643
2724
|
|
|
2644
2725
|
export interface DataTableProps extends WithTestID {
|
|
2645
2726
|
testIDs?: DataTableTestIDs;
|
|
2646
2727
|
data: DataTableCellData[][];
|
|
2647
2728
|
columns: DataTableColumn[];
|
|
2729
|
+
/** Filter definitions that are not attached to a visible column. */
|
|
2730
|
+
additionalFilters?: DataTableColumnFilter[];
|
|
2731
|
+
/** Content shown below the header when `data` is empty. */
|
|
2732
|
+
emptyContent?: React.ReactNode;
|
|
2648
2733
|
alternateRowBackground?: boolean;
|
|
2649
2734
|
totalPages?: number;
|
|
2650
2735
|
page?: number;
|
|
@@ -2673,6 +2758,16 @@ export interface DataTableProps extends WithTestID {
|
|
|
2673
2758
|
* Returns a stable key for row test ids. Defaults to row index when omitted.
|
|
2674
2759
|
*/
|
|
2675
2760
|
getRowTestID?: (row: DataTableCellData[], rowIndex: number) => string | number;
|
|
2761
|
+
/** Toolbar search string (controlled). Omit with `searchFields` to hide search. */
|
|
2762
|
+
search?: string;
|
|
2763
|
+
/** Fields included in generic `$or` search params. */
|
|
2764
|
+
searchFields?: string[];
|
|
2765
|
+
onSearchChange?: (search: string) => void;
|
|
2766
|
+
/** Controlled column filter draft/applied values keyed by field (and `field_gte` / `field_lte`). */
|
|
2767
|
+
filterValues?: Record<string, unknown>;
|
|
2768
|
+
onFilterValuesChange?: (next: Record<string, unknown>) => void;
|
|
2769
|
+
/** Fires when debounced search or applied filters change. Excludes page, limit, and sort. */
|
|
2770
|
+
onQueryChange?: (params: DataTableQueryParams) => void;
|
|
2676
2771
|
}
|
|
2677
2772
|
|
|
2678
2773
|
export interface DataTableCellProps {
|
|
@@ -370,4 +370,59 @@ describe("ConsentNavigator", () => {
|
|
|
370
370
|
});
|
|
371
371
|
expect(submitMutation).toHaveBeenCalled();
|
|
372
372
|
});
|
|
373
|
+
|
|
374
|
+
it("invokes onError when consent submission fails on decline", async () => {
|
|
375
|
+
const {act, fireEvent} = await import("@testing-library/react-native");
|
|
376
|
+
const form = makeForm({allowDecline: true, required: false});
|
|
377
|
+
const onError = mock(() => {});
|
|
378
|
+
const declineError = new Error("decline failed");
|
|
379
|
+
const unwrap = mock(() => Promise.reject(declineError));
|
|
380
|
+
const submitMutation = mock(() => ({unwrap}));
|
|
381
|
+
const refetch = mock(() => Promise.resolve());
|
|
382
|
+
const api = {
|
|
383
|
+
enhanceEndpoints: mock(() => ({
|
|
384
|
+
injectEndpoints: mock(() => ({
|
|
385
|
+
useGetPendingConsentsQuery: mock(() => ({
|
|
386
|
+
data: {data: [form]},
|
|
387
|
+
error: undefined,
|
|
388
|
+
isLoading: false,
|
|
389
|
+
refetch,
|
|
390
|
+
})),
|
|
391
|
+
useSubmitConsentResponseMutation: mock(() => [
|
|
392
|
+
submitMutation,
|
|
393
|
+
{error: undefined, isLoading: false},
|
|
394
|
+
]),
|
|
395
|
+
})),
|
|
396
|
+
})),
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
const {getByTestId} = renderWithTheme(
|
|
400
|
+
<ConsentNavigator api={api} onError={onError}>
|
|
401
|
+
<Text>App Content</Text>
|
|
402
|
+
</ConsentNavigator>
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
await act(async () => {
|
|
406
|
+
fireEvent.press(getByTestId("consent-form-decline-button"));
|
|
407
|
+
});
|
|
408
|
+
await act(async () => {
|
|
409
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
expect(onError).toHaveBeenCalledWith(declineError);
|
|
413
|
+
expect(refetch).not.toHaveBeenCalled();
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
it("renders non-element extra screens as-is without injecting onNext", async () => {
|
|
417
|
+
const api = createMockApi([]);
|
|
418
|
+
|
|
419
|
+
const {queryByText, toJSON} = renderWithTheme(
|
|
420
|
+
<ConsentNavigator api={api} extraScreens={[null]}>
|
|
421
|
+
<Text>App Content</Text>
|
|
422
|
+
</ConsentNavigator>
|
|
423
|
+
);
|
|
424
|
+
|
|
425
|
+
expect(toJSON()).toBeNull();
|
|
426
|
+
expect(queryByText("App Content")).toBeNull();
|
|
427
|
+
});
|
|
373
428
|
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {describe, expect, it} from "bun:test";
|
|
2
|
+
import {act, fireEvent} from "@testing-library/react-native";
|
|
3
|
+
|
|
4
|
+
import {Box} from "./Box";
|
|
5
|
+
import {getSpacing} from "./Common";
|
|
6
|
+
import {DashboardGrid} from "./DashboardGrid";
|
|
7
|
+
import {getDashboardCellWidth} from "./dashboardGridLayout";
|
|
8
|
+
import {renderWithTheme} from "./test-utils";
|
|
9
|
+
|
|
10
|
+
describe("DashboardGrid", () => {
|
|
11
|
+
it("keeps child testIDs", () => {
|
|
12
|
+
const {getByTestId} = renderWithTheme(
|
|
13
|
+
<DashboardGrid testID="grid">
|
|
14
|
+
<Box testID="tile-a">A</Box>
|
|
15
|
+
<Box testID="tile-b">B</Box>
|
|
16
|
+
</DashboardGrid>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
expect(getByTestId("grid")).toBeTruthy();
|
|
20
|
+
expect(getByTestId("tile-a")).toBeTruthy();
|
|
21
|
+
expect(getByTestId("tile-b")).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("renders custom gap without dropping children", () => {
|
|
25
|
+
const {getByTestId} = renderWithTheme(
|
|
26
|
+
<DashboardGrid columns={{lg: 3, md: 2, sm: 1}} gap={2} testID="grid">
|
|
27
|
+
<Box testID="only">One</Box>
|
|
28
|
+
</DashboardGrid>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
expect(getByTestId("only")).toBeTruthy();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("omits falsy conditional children instead of reserving empty cells", () => {
|
|
35
|
+
const {getByTestId, queryByTestId} = renderWithTheme(
|
|
36
|
+
<DashboardGrid testID="grid">
|
|
37
|
+
{false}
|
|
38
|
+
{null}
|
|
39
|
+
{undefined}
|
|
40
|
+
<Box testID="tile-a">A</Box>
|
|
41
|
+
<Box testID="tile-b">B</Box>
|
|
42
|
+
</DashboardGrid>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
expect(getByTestId("grid.cell.0")).toBeTruthy();
|
|
46
|
+
expect(getByTestId("grid.cell.1")).toBeTruthy();
|
|
47
|
+
expect(queryByTestId("grid.cell.2")).toBeNull();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("sizes cells so column widths plus gap fit the measured row", async () => {
|
|
51
|
+
const {getByTestId} = renderWithTheme(
|
|
52
|
+
<DashboardGrid columns={{lg: 3, md: 3, sm: 3}} gap={4} testID="grid">
|
|
53
|
+
<Box testID="tile-a">A</Box>
|
|
54
|
+
<Box testID="tile-b">B</Box>
|
|
55
|
+
<Box testID="tile-c">C</Box>
|
|
56
|
+
</DashboardGrid>
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
await act(async () => {
|
|
60
|
+
fireEvent(getByTestId("grid"), "layout", {
|
|
61
|
+
nativeEvent: {layout: {height: 80, width: 332}},
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const expectedWidth = getDashboardCellWidth({
|
|
66
|
+
columnCount: 3,
|
|
67
|
+
gapPx: getSpacing(4),
|
|
68
|
+
rowWidth: 332,
|
|
69
|
+
});
|
|
70
|
+
expect(getByTestId("grid.cell.0").props.style).toMatchObject({
|
|
71
|
+
maxWidth: expectedWidth,
|
|
72
|
+
width: expectedWidth,
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type {FC, ReactNode} from "react";
|
|
2
|
+
import {Children, useCallback, useState} from "react";
|
|
3
|
+
|
|
4
|
+
import {Box} from "./Box";
|
|
5
|
+
import type {DashboardGridProps, LayoutChangeEvent} from "./Common";
|
|
6
|
+
import {getSpacing} from "./Common";
|
|
7
|
+
import {getDashboardCellBoxStyle} from "./dashboardGridLayout";
|
|
8
|
+
import {useResponsiveBreakpoint} from "./ResponsiveBreakpoint";
|
|
9
|
+
import {resolveTestID} from "./testing/resolveTestId";
|
|
10
|
+
|
|
11
|
+
const DEFAULT_COLUMNS = {lg: 3, md: 2, sm: 1};
|
|
12
|
+
|
|
13
|
+
const resolveColumnCount = ({
|
|
14
|
+
breakpoint,
|
|
15
|
+
columns,
|
|
16
|
+
}: {
|
|
17
|
+
breakpoint: "xs" | "sm" | "md" | "lg" | "xl";
|
|
18
|
+
columns: {lg: number; md: number; sm: number};
|
|
19
|
+
}): number => {
|
|
20
|
+
if (breakpoint === "lg" || breakpoint === "xl") {
|
|
21
|
+
return columns.lg;
|
|
22
|
+
}
|
|
23
|
+
if (breakpoint === "md") {
|
|
24
|
+
return columns.md;
|
|
25
|
+
}
|
|
26
|
+
return columns.sm;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const DashboardGrid: FC<DashboardGridProps> = ({
|
|
30
|
+
children,
|
|
31
|
+
columns = DEFAULT_COLUMNS,
|
|
32
|
+
gap = 4,
|
|
33
|
+
testID,
|
|
34
|
+
}) => {
|
|
35
|
+
const renderedChildren = Children.toArray(children);
|
|
36
|
+
const breakpoint = useResponsiveBreakpoint({enabled: true});
|
|
37
|
+
const [rowWidth, setRowWidth] = useState(0);
|
|
38
|
+
const columnCount = Math.max(resolveColumnCount({breakpoint, columns}), 1);
|
|
39
|
+
const cellStyle = getDashboardCellBoxStyle({
|
|
40
|
+
columnCount,
|
|
41
|
+
gapPx: getSpacing(gap),
|
|
42
|
+
rowWidth,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const handleLayout = useCallback((event: LayoutChangeEvent): void => {
|
|
46
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
47
|
+
if (nextWidth > 0) {
|
|
48
|
+
setRowWidth(nextWidth);
|
|
49
|
+
}
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Box direction="row" gap={gap} onLayout={handleLayout} testID={testID} width="100%" wrap>
|
|
54
|
+
{renderedChildren.map((child: ReactNode, index: number) => (
|
|
55
|
+
<Box
|
|
56
|
+
dangerouslySetInlineStyle={{
|
|
57
|
+
__style: cellStyle,
|
|
58
|
+
}}
|
|
59
|
+
key={`dashboard-cell-${index}`}
|
|
60
|
+
testID={resolveTestID(testID, `cell.${index}`)}
|
|
61
|
+
>
|
|
62
|
+
{child}
|
|
63
|
+
</Box>
|
|
64
|
+
))}
|
|
65
|
+
</Box>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type {DashboardGridProps} from "./Common";
|
package/src/DataTable.test.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {describe, expect, it, mock} from "bun:test";
|
|
2
|
-
import {act} from "@testing-library/react-native";
|
|
2
|
+
import {act, fireEvent, waitFor} from "@testing-library/react-native";
|
|
3
|
+
import {type FC, useState} from "react";
|
|
4
|
+
import {Platform} from "react-native";
|
|
3
5
|
|
|
4
6
|
import type {DataTableCustomComponentMap, DataTableProps} from "./Common";
|
|
5
7
|
import {DataTable} from "./DataTable";
|
|
@@ -502,6 +504,299 @@ describe("DataTable", () => {
|
|
|
502
504
|
}
|
|
503
505
|
});
|
|
504
506
|
|
|
507
|
+
it("does not render filter or search controls without filter/search props", () => {
|
|
508
|
+
const {queryByTestId} = renderWithTheme(
|
|
509
|
+
<DataTable columns={sampleColumns} data={sampleData} />
|
|
510
|
+
);
|
|
511
|
+
expect(queryByTestId("data-table-search")).toBeNull();
|
|
512
|
+
expect(queryByTestId("data-table-filters-trigger")).toBeNull();
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
it("fires onQueryChange for debounced search", async () => {
|
|
516
|
+
const onQueryChange = mock(() => {});
|
|
517
|
+
const Harness: FC = () => {
|
|
518
|
+
const [search, setSearch] = useState("");
|
|
519
|
+
return (
|
|
520
|
+
<DataTable
|
|
521
|
+
columns={sampleColumns}
|
|
522
|
+
data={sampleData}
|
|
523
|
+
onQueryChange={onQueryChange}
|
|
524
|
+
onSearchChange={setSearch}
|
|
525
|
+
search={search}
|
|
526
|
+
searchFields={["name"]}
|
|
527
|
+
/>
|
|
528
|
+
);
|
|
529
|
+
};
|
|
530
|
+
const {getByTestId} = renderWithTheme(<Harness />);
|
|
531
|
+
await act(async () => {
|
|
532
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
533
|
+
});
|
|
534
|
+
onQueryChange.mockClear();
|
|
535
|
+
|
|
536
|
+
await act(async () => {
|
|
537
|
+
fireEvent.changeText(getByTestId("data-table-search"), "Ali.*");
|
|
538
|
+
});
|
|
539
|
+
await act(async () => {
|
|
540
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
541
|
+
});
|
|
542
|
+
expect(onQueryChange).not.toHaveBeenCalled();
|
|
543
|
+
|
|
544
|
+
await act(async () => {
|
|
545
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
546
|
+
});
|
|
547
|
+
expect(onQueryChange).toHaveBeenCalledTimes(1);
|
|
548
|
+
expect(onQueryChange).toHaveBeenCalledWith({
|
|
549
|
+
$or: [{name: {$options: "i", $regex: "Ali\\.\\*"}}],
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
it("does not re-emit an unchanged query when controlled arrays are recreated", async () => {
|
|
554
|
+
const onQueryChange = mock(() => {});
|
|
555
|
+
const {rerender} = renderWithTheme(
|
|
556
|
+
<DataTable
|
|
557
|
+
columns={[...sampleColumns]}
|
|
558
|
+
data={sampleData}
|
|
559
|
+
onQueryChange={onQueryChange}
|
|
560
|
+
search=""
|
|
561
|
+
searchFields={["Name"]}
|
|
562
|
+
/>
|
|
563
|
+
);
|
|
564
|
+
await act(async () => {
|
|
565
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
566
|
+
});
|
|
567
|
+
expect(onQueryChange).toHaveBeenCalledTimes(1);
|
|
568
|
+
|
|
569
|
+
rerender(
|
|
570
|
+
<DataTable
|
|
571
|
+
columns={[...sampleColumns]}
|
|
572
|
+
data={sampleData}
|
|
573
|
+
onQueryChange={onQueryChange}
|
|
574
|
+
search=""
|
|
575
|
+
searchFields={["Name"]}
|
|
576
|
+
/>
|
|
577
|
+
);
|
|
578
|
+
await act(async () => {
|
|
579
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
580
|
+
});
|
|
581
|
+
expect(onQueryChange).toHaveBeenCalledTimes(1);
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
it("renders web column filter triggers for filterable columns", () => {
|
|
585
|
+
const originalOS = Platform.OS;
|
|
586
|
+
Platform.OS = "web";
|
|
587
|
+
const filterColumns = [
|
|
588
|
+
{
|
|
589
|
+
columnType: "text",
|
|
590
|
+
filter: {field: "name", kind: "text" as const},
|
|
591
|
+
title: "Name",
|
|
592
|
+
width: 150,
|
|
593
|
+
},
|
|
594
|
+
];
|
|
595
|
+
const {getByTestId} = renderWithTheme(
|
|
596
|
+
<DataTable
|
|
597
|
+
columns={filterColumns}
|
|
598
|
+
data={[[{value: "Alice"}]]}
|
|
599
|
+
filterValues={{}}
|
|
600
|
+
onFilterValuesChange={() => {}}
|
|
601
|
+
/>
|
|
602
|
+
);
|
|
603
|
+
expect(getByTestId("data-table-filter-name.trigger").props.accessibilityLabel).toBe(
|
|
604
|
+
"Filter Name"
|
|
605
|
+
);
|
|
606
|
+
Platform.OS = originalOS;
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
it("applies native sheet filters through the shared query contract", async () => {
|
|
610
|
+
const originalOS = Platform.OS;
|
|
611
|
+
Platform.OS = "ios";
|
|
612
|
+
const onQueryChange = mock(() => {});
|
|
613
|
+
const filterColumns = [
|
|
614
|
+
{
|
|
615
|
+
columnType: "boolean",
|
|
616
|
+
filter: {field: "active", kind: "boolean" as const},
|
|
617
|
+
title: "Active",
|
|
618
|
+
width: 100,
|
|
619
|
+
},
|
|
620
|
+
];
|
|
621
|
+
const Harness: FC = () => {
|
|
622
|
+
const [filterValues, setFilterValues] = useState<Record<string, unknown>>({});
|
|
623
|
+
return (
|
|
624
|
+
<DataTable
|
|
625
|
+
columns={filterColumns}
|
|
626
|
+
data={[[{value: true}]]}
|
|
627
|
+
filterValues={filterValues}
|
|
628
|
+
onFilterValuesChange={setFilterValues}
|
|
629
|
+
onQueryChange={onQueryChange}
|
|
630
|
+
/>
|
|
631
|
+
);
|
|
632
|
+
};
|
|
633
|
+
const {getByTestId, queryByTestId} = renderWithTheme(<Harness />);
|
|
634
|
+
expect(queryByTestId("data-table-filter-active.trigger")).toBeNull();
|
|
635
|
+
await act(async () => {
|
|
636
|
+
fireEvent.press(getByTestId("data-table-filters-trigger"));
|
|
637
|
+
});
|
|
638
|
+
await waitFor(() => {
|
|
639
|
+
expect(getByTestId("data-table-filter-active.switch")).toBeTruthy();
|
|
640
|
+
});
|
|
641
|
+
await act(async () => {
|
|
642
|
+
fireEvent.press(getByTestId("data-table-filter-active.switch"));
|
|
643
|
+
});
|
|
644
|
+
await act(async () => {
|
|
645
|
+
fireEvent.press(getByTestId("data-table-filters-sheet.primary"));
|
|
646
|
+
});
|
|
647
|
+
await act(async () => {
|
|
648
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
649
|
+
});
|
|
650
|
+
expect(onQueryChange).toHaveBeenLastCalledWith({active: true});
|
|
651
|
+
Platform.OS = originalOS;
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
it("clears every native filter draft, including date range bounds, via Clear all", async () => {
|
|
655
|
+
const originalOS = Platform.OS;
|
|
656
|
+
Platform.OS = "ios";
|
|
657
|
+
const onFilterValuesChange = mock(() => {});
|
|
658
|
+
const filterColumns = [
|
|
659
|
+
{
|
|
660
|
+
columnType: "boolean",
|
|
661
|
+
filter: {field: "active", kind: "boolean" as const},
|
|
662
|
+
title: "Active",
|
|
663
|
+
width: 100,
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
columnType: "date",
|
|
667
|
+
filter: {field: "created", kind: "dateRange" as const},
|
|
668
|
+
title: "Created",
|
|
669
|
+
width: 150,
|
|
670
|
+
},
|
|
671
|
+
];
|
|
672
|
+
const {getByTestId, getByText} = renderWithTheme(
|
|
673
|
+
<DataTable
|
|
674
|
+
columns={filterColumns}
|
|
675
|
+
data={[[{value: true}, {value: "2026-01-01"}]]}
|
|
676
|
+
filterValues={{active: true, created_gte: "2026-01-01", created_lte: "2026-01-31"}}
|
|
677
|
+
onFilterValuesChange={onFilterValuesChange}
|
|
678
|
+
/>
|
|
679
|
+
);
|
|
680
|
+
await act(async () => {
|
|
681
|
+
fireEvent.press(getByTestId("data-table-filters-trigger"));
|
|
682
|
+
});
|
|
683
|
+
await waitFor(() => {
|
|
684
|
+
expect(getByText("Clear all")).toBeTruthy();
|
|
685
|
+
});
|
|
686
|
+
await act(async () => {
|
|
687
|
+
fireEvent.press(getByText("Clear all"));
|
|
688
|
+
});
|
|
689
|
+
await act(async () => {
|
|
690
|
+
fireEvent.press(getByTestId("data-table-filters-sheet.primary"));
|
|
691
|
+
});
|
|
692
|
+
expect(onFilterValuesChange).toHaveBeenLastCalledWith({
|
|
693
|
+
active: undefined,
|
|
694
|
+
created_gte: undefined,
|
|
695
|
+
created_lte: undefined,
|
|
696
|
+
});
|
|
697
|
+
Platform.OS = originalOS;
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
it("renders the web additional filters trigger when toolbar-only filters are provided", () => {
|
|
701
|
+
const originalOS = Platform.OS;
|
|
702
|
+
const globalScope = globalThis as {document?: unknown; HTMLElement?: unknown};
|
|
703
|
+
const originalDocument = globalScope.document;
|
|
704
|
+
const originalHTMLElement = globalScope.HTMLElement;
|
|
705
|
+
Platform.OS = "web";
|
|
706
|
+
globalScope.HTMLElement = class FakeHTMLElement {};
|
|
707
|
+
globalScope.document = {body: {}};
|
|
708
|
+
try {
|
|
709
|
+
const {getByTestId} = renderWithTheme(
|
|
710
|
+
<DataTable
|
|
711
|
+
additionalFilters={[{field: "department", kind: "text", label: "Department"}]}
|
|
712
|
+
columns={sampleColumns}
|
|
713
|
+
data={sampleData}
|
|
714
|
+
filterValues={{}}
|
|
715
|
+
onFilterValuesChange={() => {}}
|
|
716
|
+
/>
|
|
717
|
+
);
|
|
718
|
+
expect(getByTestId("data-table-additional-filters.trigger")).toBeTruthy();
|
|
719
|
+
} finally {
|
|
720
|
+
Platform.OS = originalOS;
|
|
721
|
+
globalScope.document = originalDocument;
|
|
722
|
+
globalScope.HTMLElement = originalHTMLElement;
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
|
|
726
|
+
it("syncs body and pinned lists when the more-content list scrolls", () => {
|
|
727
|
+
const MoreContent: MoreContentComponent = ({rowIndex}) => <Text>Row {rowIndex}</Text>;
|
|
728
|
+
const {UNSAFE_getAllByType} = renderWithTheme(
|
|
729
|
+
<DataTable
|
|
730
|
+
columns={sampleColumns}
|
|
731
|
+
data={sampleData}
|
|
732
|
+
moreContentComponent={MoreContent}
|
|
733
|
+
pinnedColumns={1}
|
|
734
|
+
/>
|
|
735
|
+
);
|
|
736
|
+
const {FlatList: FlatListComp} = require("react-native");
|
|
737
|
+
const lists = UNSAFE_getAllByType(FlatListComp) as Array<{
|
|
738
|
+
props: {
|
|
739
|
+
onScroll?: (event: {nativeEvent: {contentOffset: {x: number; y: number}}}) => void;
|
|
740
|
+
ref?: {current: {scrollToOffset: (opts: {offset: number}) => void} | null};
|
|
741
|
+
showsVerticalScrollIndicator?: boolean;
|
|
742
|
+
};
|
|
743
|
+
}>;
|
|
744
|
+
const bodyList = lists.find((list) => list.props.showsVerticalScrollIndicator === true);
|
|
745
|
+
const satelliteLists = lists.filter(
|
|
746
|
+
(list) => list.props.showsVerticalScrollIndicator === false
|
|
747
|
+
);
|
|
748
|
+
expect(bodyList).toBeTruthy();
|
|
749
|
+
expect(satelliteLists).toHaveLength(2);
|
|
750
|
+
const [moreList, pinnedList] = satelliteLists;
|
|
751
|
+
|
|
752
|
+
const offsets: Record<string, number[]> = {body: [], more: [], pinned: []};
|
|
753
|
+
for (const [name, list] of Object.entries({
|
|
754
|
+
body: bodyList!,
|
|
755
|
+
more: moreList,
|
|
756
|
+
pinned: pinnedList,
|
|
757
|
+
})) {
|
|
758
|
+
list.props.ref!.current!.scrollToOffset = ({offset}) => {
|
|
759
|
+
offsets[name].push(offset);
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
act(() => {
|
|
764
|
+
moreList.props.onScroll?.({nativeEvent: {contentOffset: {x: 0, y: 120}}});
|
|
765
|
+
});
|
|
766
|
+
expect(offsets.body).toEqual([120]);
|
|
767
|
+
expect(offsets.pinned).toEqual([120]);
|
|
768
|
+
expect(offsets.more).toEqual([]);
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
it("re-aligns the more-content list to the body offset when it mounts without pinned columns", () => {
|
|
772
|
+
const MoreContent: MoreContentComponent = ({rowIndex}) => <Text>Row {rowIndex}</Text>;
|
|
773
|
+
const {UNSAFE_getAllByType, rerender} = renderWithTheme(
|
|
774
|
+
<DataTable columns={sampleColumns} data={sampleData} />
|
|
775
|
+
);
|
|
776
|
+
const {FlatList: FlatListComp} = require("react-native");
|
|
777
|
+
const findLists = () =>
|
|
778
|
+
UNSAFE_getAllByType(FlatListComp) as Array<{
|
|
779
|
+
props: {
|
|
780
|
+
onScroll?: (event: {nativeEvent: {contentOffset: {x: number; y: number}}}) => void;
|
|
781
|
+
showsVerticalScrollIndicator?: boolean;
|
|
782
|
+
};
|
|
783
|
+
}>;
|
|
784
|
+
expect(findLists()).toHaveLength(1);
|
|
785
|
+
act(() => {
|
|
786
|
+
findLists()[0].props.onScroll?.({nativeEvent: {contentOffset: {x: 0, y: 80}}});
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
rerender(
|
|
790
|
+
<DataTable columns={sampleColumns} data={sampleData} moreContentComponent={MoreContent} />
|
|
791
|
+
);
|
|
792
|
+
const lists = findLists();
|
|
793
|
+
expect(lists).toHaveLength(2);
|
|
794
|
+
expect(lists.some((list) => list.props.showsVerticalScrollIndicator === false)).toBe(true);
|
|
795
|
+
|
|
796
|
+
rerender(<DataTable columns={sampleColumns} data={sampleData} />);
|
|
797
|
+
expect(findLists()).toHaveLength(1);
|
|
798
|
+
});
|
|
799
|
+
|
|
505
800
|
it("handleSort with no setSortColumn is a no-op", () => {
|
|
506
801
|
const sortableColumns = [{columnType: "text", sortable: true, title: "Name", width: 150}];
|
|
507
802
|
const {UNSAFE_getAllByType} = renderWithTheme(
|