@terreno/ui 0.22.2 → 0.23.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 +27 -0
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.js.map +1 -1
- package/dist/BooleanField.js +6 -4
- package/dist/BooleanField.js.map +1 -1
- package/dist/Box.js +3 -2
- package/dist/Box.js.map +1 -1
- package/dist/Button.js +4 -3
- package/dist/Button.js.map +1 -1
- package/dist/CheckBox.js +2 -2
- package/dist/CheckBox.js.map +1 -1
- package/dist/Common.d.ts +44 -56
- package/dist/Common.js +1 -0
- package/dist/Common.js.map +1 -1
- package/dist/CustomSelectField.js +5 -3
- package/dist/CustomSelectField.js.map +1 -1
- package/dist/DataTable.js +18 -12
- package/dist/DataTable.js.map +1 -1
- package/dist/DateTimeField.js +5 -3
- package/dist/DateTimeField.js.map +1 -1
- package/dist/IconButton.js +8 -4
- package/dist/IconButton.js.map +1 -1
- package/dist/Link.js +2 -2
- package/dist/Link.js.map +1 -1
- package/dist/MarkdownEditor.js +14 -2
- package/dist/MarkdownEditor.js.map +1 -1
- package/dist/MarkdownEditorField.js +18 -4
- package/dist/MarkdownEditorField.js.map +1 -1
- package/dist/Modal.js +10 -6
- package/dist/Modal.js.map +1 -1
- package/dist/MultiselectField.js +5 -3
- package/dist/MultiselectField.js.map +1 -1
- package/dist/Page.js +1 -1
- package/dist/Page.js.map +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Pagination.js.map +1 -1
- package/dist/SegmentedControl.js +5 -3
- package/dist/SegmentedControl.js.map +1 -1
- package/dist/SelectField.js +5 -3
- package/dist/SelectField.js.map +1 -1
- package/dist/SocialLoginButton.js +2 -1
- package/dist/SocialLoginButton.js.map +1 -1
- package/dist/Spinner.js +3 -2
- package/dist/Spinner.js.map +1 -1
- package/dist/TextField.js +6 -4
- package/dist/TextField.js.map +1 -1
- package/dist/fieldElements/FieldError.d.ts +1 -0
- package/dist/fieldElements/FieldError.js +3 -2
- package/dist/fieldElements/FieldError.js.map +1 -1
- package/dist/fieldElements/FieldHelperText.d.ts +1 -0
- package/dist/fieldElements/FieldHelperText.js +3 -2
- package/dist/fieldElements/FieldHelperText.js.map +1 -1
- package/dist/fieldElements/FieldTitle.d.ts +1 -0
- package/dist/fieldElements/FieldTitle.js +4 -3
- package/dist/fieldElements/FieldTitle.js.map +1 -1
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/resolveTestId.d.ts +39 -0
- package/dist/testing/resolveTestId.js +97 -0
- package/dist/testing/resolveTestId.js.map +1 -0
- package/dist/testing/types.d.ts +59 -0
- package/dist/testing/types.js +2 -0
- package/dist/testing/types.js.map +1 -0
- package/package.json +2 -2
- package/src/Accordion.tsx +3 -1
- package/src/BooleanField.tsx +13 -3
- package/src/Box.tsx +3 -2
- package/src/Button.test.tsx +31 -1
- package/src/Button.tsx +5 -4
- package/src/CheckBox.tsx +7 -1
- package/src/Common.ts +66 -58
- package/src/CustomSelectField.tsx +8 -1
- package/src/DataTable.tsx +40 -3
- package/src/DateTimeField.tsx +10 -3
- package/src/ErrorBoundary.test.tsx +3 -4
- package/src/IconButton.test.tsx +14 -0
- package/src/IconButton.tsx +9 -4
- package/src/Link.tsx +2 -1
- package/src/MarkdownEditor.tsx +52 -27
- package/src/MarkdownEditorField.tsx +37 -16
- package/src/Modal.tsx +13 -0
- package/src/MultiselectField.tsx +8 -3
- package/src/Page.tsx +1 -0
- package/src/Pagination.tsx +2 -1
- package/src/SegmentedControl.tsx +15 -2
- package/src/SelectField.tsx +8 -3
- package/src/SocialLoginButton.tsx +2 -1
- package/src/Spinner.tsx +3 -2
- package/src/TextField.tsx +8 -5
- package/src/__snapshots__/AddressField.test.tsx.snap +4 -0
- package/src/__snapshots__/BooleanField.test.tsx.snap +4 -0
- package/src/__snapshots__/Button.test.tsx.snap +18 -1
- package/src/__snapshots__/DecimalRangeActionSheet.test.tsx.snap +2 -0
- package/src/__snapshots__/ErrorPage.test.tsx.snap +1 -0
- package/src/__snapshots__/Field.test.tsx.snap +8 -0
- package/src/__snapshots__/HeightActionSheet.test.tsx.snap +2 -0
- package/src/__snapshots__/HeightField.test.tsx.snap +5 -0
- package/src/__snapshots__/IconButton.test.tsx.snap +4 -0
- package/src/__snapshots__/InfoModalIcon.test.tsx.snap +4 -0
- package/src/__snapshots__/Link.test.tsx.snap +1 -0
- package/src/__snapshots__/Modal.test.tsx.snap +3 -0
- package/src/__snapshots__/NumberPickerActionSheet.test.tsx.snap +2 -0
- package/src/__snapshots__/Page.test.tsx.snap +22 -0
- package/src/__snapshots__/SegmentedControl.test.tsx.snap +4 -0
- package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +1 -0
- package/src/fieldElements/FieldError.tsx +7 -2
- package/src/fieldElements/FieldHelperText.tsx +4 -2
- package/src/fieldElements/FieldTitle.tsx +4 -1
- package/src/login/__snapshots__/LoginScreen.test.tsx.snap +7 -0
- package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +7 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/resolveTestId.test.ts +231 -0
- package/src/testing/resolveTestId.ts +142 -0
- package/src/testing/types.ts +67 -0
package/dist/Common.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ import type { DimensionValue } from "react-native/Libraries/StyleSheet/StyleShee
|
|
|
6
6
|
import type { Styles } from "react-native-google-places-autocomplete";
|
|
7
7
|
import type { SvgProps } from "react-native-svg";
|
|
8
8
|
import type { FontAwesome6BrandNames, FontAwesome6RegularNames, FontAwesome6SolidNames } from "./CommonIconTypes";
|
|
9
|
+
import type { DataTableTestIDs, FieldTestIDs, ModalTestIDs, SegmentedControlTestIDs, WithTestID } from "./testing/types";
|
|
10
|
+
export { resolveDataTableRowTestID, resolveDataTableTestIDsFromProps, resolveFieldTestIDsFromProps, resolveModalTestIDsFromProps, resolveTestID, toDomTestProps, toPlatformTestProps, toTestProps, } from "./testing";
|
|
11
|
+
export type { DataTableTestIDs, FieldTestIDs, ModalTestIDs, SegmentedControlTestIDs, WithTestID, } from "./testing/types";
|
|
9
12
|
export type PercentageString = `${number}%`;
|
|
10
13
|
export type NumberOrPercentage = number | PercentageString | string;
|
|
11
|
-
export interface InfoModalIconProps {
|
|
14
|
+
export interface InfoModalIconProps extends WithTestID {
|
|
12
15
|
/**
|
|
13
16
|
* The content of the information modal.
|
|
14
17
|
*/
|
|
@@ -314,12 +317,11 @@ export interface CustomIconRegistry {
|
|
|
314
317
|
export type CustomIconName = keyof CustomIconRegistry & string;
|
|
315
318
|
export type IconName = FontAwesome6SolidNames | FontAwesome6BrandNames | FontAwesome6RegularNames | CustomIconName;
|
|
316
319
|
/** Props passed to a custom icon component when it is rendered. */
|
|
317
|
-
export interface CustomIconProps {
|
|
320
|
+
export interface CustomIconProps extends WithTestID {
|
|
318
321
|
/** Resolved color string, already mapped from the active theme. */
|
|
319
322
|
color: string;
|
|
320
323
|
/** Resolved icon size in pixels. */
|
|
321
324
|
size: number;
|
|
322
|
-
testID?: string;
|
|
323
325
|
}
|
|
324
326
|
/** A component that renders a custom (non-FontAwesome) icon. */
|
|
325
327
|
export type CustomIconComponent = FC<CustomIconProps>;
|
|
@@ -368,7 +370,7 @@ export interface AccessibilityProps {
|
|
|
368
370
|
accessibilityLabel: string;
|
|
369
371
|
accessibilityHint: string;
|
|
370
372
|
}
|
|
371
|
-
export interface BoxPropsBase {
|
|
373
|
+
export interface BoxPropsBase extends WithTestID {
|
|
372
374
|
alignContent?: AlignContent;
|
|
373
375
|
alignItems?: AlignItems;
|
|
374
376
|
alignSelf?: AlignSelf;
|
|
@@ -467,7 +469,6 @@ export interface BoxPropsBase {
|
|
|
467
469
|
scrollRef?: React.RefObject<ScrollView | null>;
|
|
468
470
|
onScroll?: (offsetY: number) => void;
|
|
469
471
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
470
|
-
testID?: string;
|
|
471
472
|
}
|
|
472
473
|
export type BoxProps = (BoxPropsBase & {
|
|
473
474
|
onClick?: undefined;
|
|
@@ -526,12 +527,11 @@ export interface ErrorBoundaryProps {
|
|
|
526
527
|
onError?: (error: Error, stack: string) => void;
|
|
527
528
|
children?: ReactNode;
|
|
528
529
|
}
|
|
529
|
-
export interface IconProps {
|
|
530
|
+
export interface IconProps extends WithTestID {
|
|
530
531
|
iconName: IconName;
|
|
531
532
|
type?: "regular" | "brand" | "solid" | "light" | "thin" | "duotone" | "sharpSolid" | "sharpLight" | "sharp";
|
|
532
533
|
color?: IconColor;
|
|
533
534
|
size?: IconSize;
|
|
534
|
-
testID?: string;
|
|
535
535
|
}
|
|
536
536
|
export type TooltipPosition = "top" | "bottom" | "left" | "right";
|
|
537
537
|
export type IndicatorDirection = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
@@ -539,7 +539,8 @@ export interface SegmentedControlBadgeConfig {
|
|
|
539
539
|
count: number;
|
|
540
540
|
status?: "info" | "error" | "warning" | "success" | "neutral";
|
|
541
541
|
}
|
|
542
|
-
export interface SegmentedControlProps {
|
|
542
|
+
export interface SegmentedControlProps extends WithTestID {
|
|
543
|
+
testIDs?: SegmentedControlTestIDs;
|
|
543
544
|
items: string[];
|
|
544
545
|
size?: "md" | "lg";
|
|
545
546
|
onChange: (activeIndex: number) => void;
|
|
@@ -556,9 +557,9 @@ export interface TimezonePickerProps {
|
|
|
556
557
|
export interface TextStyleWithOutline extends TextStyle {
|
|
557
558
|
outline?: string;
|
|
558
559
|
}
|
|
559
|
-
interface BaseFieldProps {
|
|
560
|
+
interface BaseFieldProps extends WithTestID {
|
|
560
561
|
id?: string;
|
|
561
|
-
|
|
562
|
+
testIDs?: FieldTestIDs;
|
|
562
563
|
title?: string;
|
|
563
564
|
placeholder?: string;
|
|
564
565
|
iconName?: IconName;
|
|
@@ -654,14 +655,13 @@ export interface AddressFieldProps extends Omit<BaseFieldProps, "value" | "onCha
|
|
|
654
655
|
}
|
|
655
656
|
export type Rounding = "minimal" | "default" | "full" | "rounded" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
656
657
|
export declare const getRounding: (rounding: Rounding) => number;
|
|
657
|
-
export interface HeadingProps {
|
|
658
|
+
export interface HeadingProps extends WithTestID {
|
|
658
659
|
align?: "left" | "right" | "center" | "justify";
|
|
659
660
|
children?: React.ReactNode;
|
|
660
661
|
color?: TextColor;
|
|
661
662
|
overflow?: "normal" | "breakWord";
|
|
662
663
|
size?: "sm" | "md" | "lg" | "xl" | "2xl";
|
|
663
664
|
truncate?: boolean;
|
|
664
|
-
testID?: string;
|
|
665
665
|
}
|
|
666
666
|
export interface MetaProps {
|
|
667
667
|
itemProp?: string;
|
|
@@ -691,7 +691,8 @@ export interface ImageProps {
|
|
|
691
691
|
export interface BackButtonInterface {
|
|
692
692
|
onBack: () => void;
|
|
693
693
|
}
|
|
694
|
-
export interface BooleanFieldProps extends HelperTextProps, ErrorTextProps {
|
|
694
|
+
export interface BooleanFieldProps extends WithTestID, HelperTextProps, ErrorTextProps {
|
|
695
|
+
testIDs?: FieldTestIDs;
|
|
695
696
|
title?: string;
|
|
696
697
|
variant?: "simple" | "title";
|
|
697
698
|
disabled?: boolean;
|
|
@@ -699,7 +700,7 @@ export interface BooleanFieldProps extends HelperTextProps, ErrorTextProps {
|
|
|
699
700
|
value: boolean;
|
|
700
701
|
onChange: (value: boolean) => void;
|
|
701
702
|
}
|
|
702
|
-
export interface CheckBoxProps {
|
|
703
|
+
export interface CheckBoxProps extends WithTestID {
|
|
703
704
|
/**
|
|
704
705
|
* The background color of the checkbox.
|
|
705
706
|
* @default "default"
|
|
@@ -775,7 +776,7 @@ export type ReactChildren = ReactNode;
|
|
|
775
776
|
export type WithChildren<P> = P & {
|
|
776
777
|
children?: ReactNode;
|
|
777
778
|
};
|
|
778
|
-
export interface AddressAutocompleteProps {
|
|
779
|
+
export interface AddressAutocompleteProps extends WithTestID {
|
|
779
780
|
disabled?: boolean;
|
|
780
781
|
googleMapsApiKey?: string;
|
|
781
782
|
includeCounty?: boolean;
|
|
@@ -784,9 +785,8 @@ export interface AddressAutocompleteProps {
|
|
|
784
785
|
handleAddressChange: OnChangeCallback;
|
|
785
786
|
handleAutoCompleteChange: (value: AddressInterface) => void;
|
|
786
787
|
googlePlacesMobileStyles?: Styles;
|
|
787
|
-
testID?: string;
|
|
788
788
|
}
|
|
789
|
-
export interface ActionSheetProps {
|
|
789
|
+
export interface ActionSheetProps extends WithTestID {
|
|
790
790
|
children?: React.ReactNode;
|
|
791
791
|
ref?: React.MutableRefObject<{
|
|
792
792
|
/**
|
|
@@ -1077,10 +1077,6 @@ export interface ActionSheetProps {
|
|
|
1077
1077
|
Default:`padding`
|
|
1078
1078
|
*/
|
|
1079
1079
|
keyboardMode?: "padding" | "position";
|
|
1080
|
-
/**
|
|
1081
|
-
* Test ID for unit testing
|
|
1082
|
-
*/
|
|
1083
|
-
testID?: string;
|
|
1084
1080
|
/**
|
|
1085
1081
|
*
|
|
1086
1082
|
Event called when the ActionSheet closes.
|
|
@@ -1118,7 +1114,7 @@ export interface AvatarImagePickerEvent {
|
|
|
1118
1114
|
export interface CustomSvgProps extends SvgProps {
|
|
1119
1115
|
doNotDisturb?: boolean;
|
|
1120
1116
|
}
|
|
1121
|
-
export interface AvatarProps {
|
|
1117
|
+
export interface AvatarProps extends WithTestID {
|
|
1122
1118
|
/**
|
|
1123
1119
|
* The name of the user. This is used for the placeholder treatment if an image is not available.
|
|
1124
1120
|
*/
|
|
@@ -1151,12 +1147,8 @@ export interface AvatarProps {
|
|
|
1151
1147
|
* Accessibility label for the avatar image.
|
|
1152
1148
|
*/
|
|
1153
1149
|
accessibilityLabel?: string;
|
|
1154
|
-
/**
|
|
1155
|
-
* Test ID for unit testing
|
|
1156
|
-
*/
|
|
1157
|
-
testID?: string;
|
|
1158
1150
|
}
|
|
1159
|
-
export interface BadgeProps {
|
|
1151
|
+
export interface BadgeProps extends WithTestID {
|
|
1160
1152
|
/**
|
|
1161
1153
|
* When status is "custom", determines the badge's background color.
|
|
1162
1154
|
*/
|
|
@@ -1196,10 +1188,6 @@ export interface BadgeProps {
|
|
|
1196
1188
|
* @default "info"
|
|
1197
1189
|
*/
|
|
1198
1190
|
status?: "info" | "error" | "warning" | "success" | "neutral" | "custom";
|
|
1199
|
-
/**
|
|
1200
|
-
* Test ID for unit testing
|
|
1201
|
-
*/
|
|
1202
|
-
testID?: string;
|
|
1203
1191
|
/**
|
|
1204
1192
|
* The text or number to display inside the badge.
|
|
1205
1193
|
*/
|
|
@@ -1306,7 +1294,7 @@ export interface BodyProps {
|
|
|
1306
1294
|
children?: ReactNode;
|
|
1307
1295
|
}
|
|
1308
1296
|
export type ButtonPressAnimation = "scale" | "opacity" | "none";
|
|
1309
|
-
export interface ButtonProps {
|
|
1297
|
+
export interface ButtonProps extends WithTestID {
|
|
1310
1298
|
/**
|
|
1311
1299
|
* The text content of the confirmation modal.
|
|
1312
1300
|
* @default "Are you sure you want to continue?"
|
|
@@ -1349,10 +1337,6 @@ export interface ButtonProps {
|
|
|
1349
1337
|
* @default "scale"
|
|
1350
1338
|
*/
|
|
1351
1339
|
pressAnimation?: ButtonPressAnimation;
|
|
1352
|
-
/**
|
|
1353
|
-
* The test ID for the button, used for testing purposes.
|
|
1354
|
-
*/
|
|
1355
|
-
testID?: string;
|
|
1356
1340
|
/**
|
|
1357
1341
|
* The text content of the button.
|
|
1358
1342
|
*/
|
|
@@ -1393,7 +1377,7 @@ export interface ButtonProps {
|
|
|
1393
1377
|
* Props for the SocialLoginButton component.
|
|
1394
1378
|
* Used for OAuth social login buttons (Google, GitHub, Apple).
|
|
1395
1379
|
*/
|
|
1396
|
-
export interface SocialLoginButtonProps {
|
|
1380
|
+
export interface SocialLoginButtonProps extends WithTestID {
|
|
1397
1381
|
/**
|
|
1398
1382
|
* The OAuth provider for the social login.
|
|
1399
1383
|
*/
|
|
@@ -1428,12 +1412,9 @@ export interface SocialLoginButtonProps {
|
|
|
1428
1412
|
* Custom text for the button. Defaults to "Continue with {Provider}".
|
|
1429
1413
|
*/
|
|
1430
1414
|
text?: string;
|
|
1431
|
-
/**
|
|
1432
|
-
* Test ID for testing purposes.
|
|
1433
|
-
*/
|
|
1434
|
-
testID?: string;
|
|
1435
1415
|
}
|
|
1436
|
-
export interface CustomSelectFieldProps {
|
|
1416
|
+
export interface CustomSelectFieldProps extends WithTestID {
|
|
1417
|
+
testIDs?: FieldTestIDs;
|
|
1437
1418
|
/**
|
|
1438
1419
|
* The current value of the custom select field.
|
|
1439
1420
|
*/
|
|
@@ -1560,7 +1541,7 @@ export interface HyperlinkProps {
|
|
|
1560
1541
|
children?: React.ReactNode;
|
|
1561
1542
|
style?: StyleProp<any>;
|
|
1562
1543
|
}
|
|
1563
|
-
export interface IconButtonProps {
|
|
1544
|
+
export interface IconButtonProps extends WithTestID {
|
|
1564
1545
|
/**
|
|
1565
1546
|
* The accessibility hint describes the results of performing an action on a control or view.
|
|
1566
1547
|
* It should be a very brief description of the result of interacting with the button.
|
|
@@ -1604,9 +1585,10 @@ export interface IconButtonProps {
|
|
|
1604
1585
|
*/
|
|
1605
1586
|
loading?: boolean;
|
|
1606
1587
|
/**
|
|
1607
|
-
* The
|
|
1588
|
+
* The size of the button.
|
|
1589
|
+
* @default "default"
|
|
1608
1590
|
*/
|
|
1609
|
-
|
|
1591
|
+
size?: "default" | "sm";
|
|
1610
1592
|
/**
|
|
1611
1593
|
* The ideal position of the tooltip.
|
|
1612
1594
|
*/
|
|
@@ -1624,7 +1606,7 @@ export interface IconButtonProps {
|
|
|
1624
1606
|
* The variant of the button, which determines its style.
|
|
1625
1607
|
* @default "primary"
|
|
1626
1608
|
*/
|
|
1627
|
-
variant?: "primary" | "secondary" | "muted" | "destructive" | "navigation";
|
|
1609
|
+
variant?: "primary" | "secondary" | "muted" | "destructive" | "navigation" | "ghost";
|
|
1628
1610
|
/**
|
|
1629
1611
|
* If true, a confirmation modal will be shown before the onClick action.
|
|
1630
1612
|
* @default false
|
|
@@ -1639,7 +1621,8 @@ export interface InfoTooltipButtonProps {
|
|
|
1639
1621
|
text: string;
|
|
1640
1622
|
size?: IconSize;
|
|
1641
1623
|
}
|
|
1642
|
-
export interface ModalProps {
|
|
1624
|
+
export interface ModalProps extends WithTestID {
|
|
1625
|
+
testIDs?: ModalTestIDs;
|
|
1643
1626
|
/**
|
|
1644
1627
|
* The content of the modal.
|
|
1645
1628
|
*/
|
|
@@ -1702,7 +1685,7 @@ export interface NumberPickerActionSheetProps {
|
|
|
1702
1685
|
onChange: OnChangeCallback;
|
|
1703
1686
|
actionSheetRef: React.RefObject<any>;
|
|
1704
1687
|
}
|
|
1705
|
-
export interface PageProps {
|
|
1688
|
+
export interface PageProps extends WithTestID {
|
|
1706
1689
|
navigation?: any;
|
|
1707
1690
|
scroll?: boolean;
|
|
1708
1691
|
loading?: boolean;
|
|
@@ -1764,7 +1747,7 @@ export interface SideDrawerProps {
|
|
|
1764
1747
|
children?: ReactElement;
|
|
1765
1748
|
drawerStyles?: StyleProp<ViewStyle>;
|
|
1766
1749
|
}
|
|
1767
|
-
export interface SpinnerProps {
|
|
1750
|
+
export interface SpinnerProps extends WithTestID {
|
|
1768
1751
|
size?: "sm" | "md";
|
|
1769
1752
|
color?: "light" | "dark" | "accent" | "secondary";
|
|
1770
1753
|
}
|
|
@@ -1827,7 +1810,7 @@ export interface TableProps {
|
|
|
1827
1810
|
*/
|
|
1828
1811
|
extraControls?: React.ReactElement;
|
|
1829
1812
|
}
|
|
1830
|
-
export interface PaginationProps {
|
|
1813
|
+
export interface PaginationProps extends WithTestID {
|
|
1831
1814
|
page: number;
|
|
1832
1815
|
setPage: (page: number) => void;
|
|
1833
1816
|
totalPages: number;
|
|
@@ -1852,7 +1835,8 @@ export interface DataTableColumn {
|
|
|
1852
1835
|
sortable?: boolean;
|
|
1853
1836
|
infoModalText?: string;
|
|
1854
1837
|
}
|
|
1855
|
-
export interface DataTableProps {
|
|
1838
|
+
export interface DataTableProps extends WithTestID {
|
|
1839
|
+
testIDs?: DataTableTestIDs;
|
|
1856
1840
|
data: DataTableCellData[][];
|
|
1857
1841
|
columns: DataTableColumn[];
|
|
1858
1842
|
alternateRowBackground?: boolean;
|
|
@@ -1875,6 +1859,10 @@ export interface DataTableProps {
|
|
|
1875
1859
|
} & Record<string, unknown>>;
|
|
1876
1860
|
moreContentExtraData?: Record<string, unknown>[];
|
|
1877
1861
|
customColumnComponentMap?: DataTableCustomComponentMap;
|
|
1862
|
+
/**
|
|
1863
|
+
* Returns a stable key for row test ids. Defaults to row index when omitted.
|
|
1864
|
+
*/
|
|
1865
|
+
getRowTestID?: (row: DataTableCellData[], rowIndex: number) => string | number;
|
|
1878
1866
|
}
|
|
1879
1867
|
export interface DataTableCellProps {
|
|
1880
1868
|
value: DataTableCellData;
|
|
@@ -1972,7 +1960,7 @@ export interface TableContextType {
|
|
|
1972
1960
|
export interface TableContextProviderProps extends TableContextType {
|
|
1973
1961
|
children: React.ReactNode;
|
|
1974
1962
|
}
|
|
1975
|
-
export interface TextProps {
|
|
1963
|
+
export interface TextProps extends WithTestID {
|
|
1976
1964
|
align?: "left" | "right" | "center" | "justify";
|
|
1977
1965
|
children?: React.ReactNode;
|
|
1978
1966
|
bold?: boolean;
|
|
@@ -1983,7 +1971,6 @@ export interface TextProps {
|
|
|
1983
1971
|
underline?: boolean;
|
|
1984
1972
|
numberOfLines?: number;
|
|
1985
1973
|
skipLinking?: boolean;
|
|
1986
|
-
testID?: string;
|
|
1987
1974
|
}
|
|
1988
1975
|
export interface TextFieldPickerActionSheetProps {
|
|
1989
1976
|
value?: string;
|
|
@@ -2179,7 +2166,8 @@ export interface ModelAdminCustomComponentProps extends Omit<FieldProps, "name">
|
|
|
2179
2166
|
fieldKey: string;
|
|
2180
2167
|
editing: boolean;
|
|
2181
2168
|
}
|
|
2182
|
-
export interface MultiselectFieldProps extends HelperTextProps, ErrorTextProps {
|
|
2169
|
+
export interface MultiselectFieldProps extends WithTestID, HelperTextProps, ErrorTextProps {
|
|
2170
|
+
testIDs?: FieldTestIDs;
|
|
2183
2171
|
/**
|
|
2184
2172
|
* The available options for the multiselect field.
|
|
2185
2173
|
*/
|
|
@@ -2278,7 +2266,8 @@ export interface FieldOption {
|
|
|
2278
2266
|
*/
|
|
2279
2267
|
value: string;
|
|
2280
2268
|
}
|
|
2281
|
-
export interface SelectFieldPropsBase {
|
|
2269
|
+
export interface SelectFieldPropsBase extends WithTestID {
|
|
2270
|
+
testIDs?: FieldTestIDs;
|
|
2282
2271
|
/**
|
|
2283
2272
|
* If true, the select field will be disabled.
|
|
2284
2273
|
* @default false
|
|
@@ -2647,4 +2636,3 @@ export interface SidebarNavigationPanelProps {
|
|
|
2647
2636
|
*/
|
|
2648
2637
|
onOpenChange?: (isOpen: boolean) => void;
|
|
2649
2638
|
}
|
|
2650
|
-
export {};
|
package/dist/Common.js
CHANGED
package/dist/Common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,4BAA4B,EAC5B,4BAA4B,EAC5B,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,WAAW,GACZ,MAAM,WAAW,CAAC;AA0ZnB,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAqB,EAAE,EAAE;IAClD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,WAAW,CAAC,OAAyB,CAAC,CAAC;AAChD,CAAC,CAAC;AAqBF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAe,EAAE,EAAE;IAClD,OAAO;QACL,KAAK,EAAE,EAAE;QACT,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,CAAC;KACN,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AA6WF,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,GAAG;IACZ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;IAChD,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC,CAAC;AAmpEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -4,10 +4,12 @@ import { View } from "react-native";
|
|
|
4
4
|
import { FieldHelperText } from "./fieldElements";
|
|
5
5
|
import { SelectField } from "./SelectField";
|
|
6
6
|
import { TextField } from "./TextField";
|
|
7
|
-
|
|
7
|
+
import { resolveFieldTestIDsFromProps, resolveTestID } from "./testing/resolveTestId";
|
|
8
|
+
export const CustomSelectField = ({ value, onChange, placeholder, disabled, options, title, errorText, helperText, testID, testIDs, }) => {
|
|
8
9
|
const [currentValue, setCurrentValue] = useState(value);
|
|
9
10
|
const [showCustomInput, setShowCustomInput] = useState(false);
|
|
10
11
|
const textInputRef = useRef(null);
|
|
12
|
+
const fieldTestIDs = resolveFieldTestIDsFromProps({ testID, testIDs });
|
|
11
13
|
// Boolean that checks if currentValue is a value from the
|
|
12
14
|
// options prop or if it is a true custom value
|
|
13
15
|
const isValueCustom = useMemo(() => {
|
|
@@ -52,10 +54,10 @@ export const CustomSelectField = ({ value, onChange, placeholder, disabled, opti
|
|
|
52
54
|
};
|
|
53
55
|
return (_jsxs(View, { accessibilityHint: "Select an option or input a custom value", "aria-label": "Select dropdown with popup text input field", "aria-role": "combobox", style: {
|
|
54
56
|
width: "100%",
|
|
55
|
-
}, children: [_jsx(View, { accessibilityHint: "Opens a dropdown menu. Select an option, or select custom to trigger popup to input a custom value", "aria-label": "Select dropdown", "aria-role": "button", children: _jsx(SelectField, { disabled: disabled, errorText: errorText, onChange: handleCustomSelectListChange, options: [...options, { label: "Custom", value: "custom" }], placeholder: placeholder, title: title, value: isValueCustom ? "custom" : currentValue }) }), Boolean(showCustomInput) && (_jsx(View, { accessibilityHint: "Enter a custom value or go back to select a provided option.", "aria-label": "Custom value input field", style: {
|
|
57
|
+
}, children: [_jsx(View, { accessibilityHint: "Opens a dropdown menu. Select an option, or select custom to trigger popup to input a custom value", "aria-label": "Select dropdown", "aria-role": "button", children: _jsx(SelectField, { disabled: disabled, errorText: errorText, onChange: handleCustomSelectListChange, options: [...options, { label: "Custom", value: "custom" }], placeholder: placeholder, testID: fieldTestIDs.input, testIDs: testIDs, title: title, value: isValueCustom ? "custom" : currentValue }) }), Boolean(showCustomInput) && (_jsx(View, { accessibilityHint: "Enter a custom value or go back to select a provided option.", "aria-label": "Custom value input field", style: {
|
|
56
58
|
paddingVertical: 16,
|
|
57
59
|
}, children: _jsx(TextField, { disabled: disabled, id: "customOptions", inputRef: (ref) => {
|
|
58
60
|
textInputRef.current = ref;
|
|
59
|
-
}, onChange: onChange, placeholder: "None selected", type: "text", value: value }) })), Boolean(helperText) && _jsx(FieldHelperText, { text: helperText })] }));
|
|
61
|
+
}, onChange: onChange, placeholder: "None selected", testID: resolveTestID(fieldTestIDs.input, "custom"), type: "text", value: value }) })), Boolean(helperText) && _jsx(FieldHelperText, { testID: fieldTestIDs.helper, text: helperText })] }));
|
|
60
62
|
};
|
|
61
63
|
//# sourceMappingURL=CustomSelectField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomSelectField.js","sourceRoot":"","sources":["../src/CustomSelectField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAU,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACpE,OAAO,EAAiB,IAAI,EAAC,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomSelectField.js","sourceRoot":"","sources":["../src/CustomSelectField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAU,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACpE,OAAO,EAAiB,IAAI,EAAC,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,4BAA4B,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAEpF,MAA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AC3B,KAAC,IAAI,IACH,iBAAiB,EAAC,8DAA8D,gBACrE,0BAA0B,EACrC,KAAK,EAAE;oBACL,eAAe,EAAE,EAAE;iBACpB,YAED,KAAC,SAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAC,eAAe,EAClB,QAAQ,EAAE,CAAC,GAAqB,EAAE,EAAE;wBAClC,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;oBAC7B,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAC,eAAe,EAC3B,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,EACnD,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,GACZ,GACG,CACR,EACA,OAAO,CAAC,UAAU,CAAC,IAAI,KAAC,eAAe,IAAC,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,UAAW,GAAI,IACtF,CACR,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/DataTable.js
CHANGED
|
@@ -11,6 +11,7 @@ import { Pagination } from "./Pagination";
|
|
|
11
11
|
import { Text } from "./Text";
|
|
12
12
|
import { useTheme } from "./Theme";
|
|
13
13
|
import { TableTitle } from "./table/TableTitle";
|
|
14
|
+
import { resolveDataTableRowTestID, resolveDataTableTestIDsFromProps, toTestProps, } from "./testing/resolveTestId";
|
|
14
15
|
// TODO: Add permanent horizontal scroll bar so users with only a mouse can scroll left/right
|
|
15
16
|
// easily.
|
|
16
17
|
const TextCell = ({ cellData }) => {
|
|
@@ -43,15 +44,15 @@ const DataTableCell = ({ value, columnDef, colIndex, isPinnedHorizontal, pinnedC
|
|
|
43
44
|
borderRightWidth: 3,
|
|
44
45
|
})), children: _jsx(Component, { cellData: Object.assign(Object.assign({}, value), { textSize }), column: columnDef }) }));
|
|
45
46
|
};
|
|
46
|
-
const DataTableRow = ({ rowData, rowIndex, columns, pinnedColumns, columnWidths, alternateRowBackground, customColumnComponentMap, rowHeight, }) => {
|
|
47
|
+
const DataTableRow = ({ rowData, rowIndex, columns, pinnedColumns, columnWidths, alternateRowBackground, customColumnComponentMap, rowHeight, testID, }) => {
|
|
47
48
|
const { theme } = useTheme();
|
|
48
49
|
const backgroundColor = alternateRowBackground && rowIndex % 2 === 1 ? theme.surface.neutralLight : theme.surface.base;
|
|
49
|
-
return (_jsx(View, { style: {
|
|
50
|
+
return (_jsx(View, Object.assign({ style: {
|
|
50
51
|
borderBottomColor: theme.border.default,
|
|
51
52
|
borderBottomWidth: 1,
|
|
52
53
|
flexDirection: "row",
|
|
53
54
|
height: rowHeight,
|
|
54
|
-
}, children: rowData.map((cell, colIndex) => (_jsx(DataTableCell, { backgroundColor: cell.highlight ? theme.surface[cell.highlight] : backgroundColor, colIndex: colIndex, columnDef: columns[colIndex], columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, height: rowHeight, isPinnedHorizontal: colIndex < pinnedColumns, pinnedColumns: pinnedColumns, textSize: cell.textSize, value: cell }, colIndex))) }));
|
|
55
|
+
} }, toTestProps(testID), { children: rowData.map((cell, colIndex) => (_jsx(DataTableCell, { backgroundColor: cell.highlight ? theme.surface[cell.highlight] : backgroundColor, colIndex: colIndex, columnDef: columns[colIndex], columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, height: rowHeight, isPinnedHorizontal: colIndex < pinnedColumns, pinnedColumns: pinnedColumns, textSize: cell.textSize, value: cell }, colIndex))) })));
|
|
55
56
|
};
|
|
56
57
|
const MoreButtonCell = ({ rowIndex, alternateRowBackground, onClick, rowHeight, }) => {
|
|
57
58
|
const { theme } = useTheme();
|
|
@@ -96,9 +97,9 @@ const DataTableHeaderCell = ({ column, index, isPinnedHorizontal, columnWidths,
|
|
|
96
97
|
}, children: _jsx(FontAwesome6, { color: theme.text.inverted, name: sort === "asc" ? "arrow-down" : sort === "desc" ? "arrow-up" : "arrows-up-down", selectable: undefined, size: 10, solid: true }) }) }))] }, "data-table-header-tools"),
|
|
97
98
|
] }));
|
|
98
99
|
};
|
|
99
|
-
const DataTableHeader = ({ columns, hasMoreContent, pinnedColumns, columnWidths, headerScrollRef, sortColumn, onSort, onScroll, rowHeight, headerHeight, }) => {
|
|
100
|
+
const DataTableHeader = ({ columns, hasMoreContent, pinnedColumns, columnWidths, headerScrollRef, sortColumn, onSort, onScroll, rowHeight, headerHeight, testID, }) => {
|
|
100
101
|
const { theme } = useTheme();
|
|
101
|
-
return (_jsxs(View, { style: { flexDirection: "row", position: "relative" }, children: [hasMoreContent && (_jsx(View, { style: {
|
|
102
|
+
return (_jsxs(View, { style: { flexDirection: "row", position: "relative" }, testID: testID, children: [hasMoreContent && (_jsx(View, { style: {
|
|
102
103
|
backgroundColor: theme.surface.base,
|
|
103
104
|
borderBottomColor: theme.border.default,
|
|
104
105
|
borderBottomWidth: 1,
|
|
@@ -116,10 +117,14 @@ const DataTableHeader = ({ columns, hasMoreContent, pinnedColumns, columnWidths,
|
|
|
116
117
|
marginLeft: columnWidths.slice(0, pinnedColumns).reduce((sum, width) => sum + width, 0),
|
|
117
118
|
}, children: columns.slice(pinnedColumns).map((column, index) => (_jsx(DataTableHeaderCell, { column: column, columnWidths: columnWidths, headerHeight: headerHeight, index: index + pinnedColumns, isPinnedHorizontal: false, onSort: onSort, rowHeight: rowHeight, sortColumn: sortColumn }, `scrollable-header-${index + pinnedColumns}`))) })] }));
|
|
118
119
|
};
|
|
119
|
-
const DataTableContent = ({ data, columns, pinnedColumns, alternateRowBackground, columnWidths, bodyScrollRef, onScroll, customColumnComponentMap, moreContentComponent: MoreContentContent, moreContentExtraData, moreContentSize = "md", rowHeight, }) => {
|
|
120
|
+
const DataTableContent = ({ data, columns, pinnedColumns, alternateRowBackground, columnWidths, bodyScrollRef, onScroll, customColumnComponentMap, moreContentComponent: MoreContentContent, moreContentExtraData, moreContentSize = "md", rowHeight, rowTestIdBase, getRowTestID, }) => {
|
|
120
121
|
var _a;
|
|
121
122
|
const [modalRow, setModalRow] = useState(null);
|
|
122
123
|
const { theme } = useTheme();
|
|
124
|
+
const resolveRowTestId = (row, rowIndex) => {
|
|
125
|
+
const rowKey = getRowTestID ? getRowTestID(row, rowIndex) : rowIndex;
|
|
126
|
+
return resolveDataTableRowTestID(rowTestIdBase, rowKey);
|
|
127
|
+
};
|
|
123
128
|
return (_jsxs(_Fragment, { children: [_jsx(ScrollView, { style: { flex: 1 }, children: _jsxs(View, { style: {
|
|
124
129
|
flexDirection: "row",
|
|
125
130
|
position: "relative",
|
|
@@ -135,14 +140,15 @@ const DataTableContent = ({ data, columns, pinnedColumns, alternateRowBackground
|
|
|
135
140
|
position: "absolute",
|
|
136
141
|
top: 0,
|
|
137
142
|
zIndex: 10,
|
|
138
|
-
}, children: data.map((row, rowIndex) => (_jsx(DataTableRow, { alternateRowBackground: alternateRowBackground, columns: columns.slice(0, pinnedColumns), columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, pinnedColumns: pinnedColumns, rowData: row.slice(0, pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex }, `pinned-${rowIndex}`))) })), _jsx(ScrollView, { horizontal: true, onScroll: (e) => onScroll(e, false), ref: bodyScrollRef, scrollEventThrottle: 16, showsHorizontalScrollIndicator: true, style: {
|
|
143
|
+
}, children: data.map((row, rowIndex) => (_jsx(DataTableRow, { alternateRowBackground: alternateRowBackground, columns: columns.slice(0, pinnedColumns), columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, pinnedColumns: pinnedColumns, rowData: row.slice(0, pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex, testID: pinnedColumns > 0 ? resolveRowTestId(row, rowIndex) : undefined }, `pinned-${rowIndex}`))) })), _jsx(ScrollView, { horizontal: true, onScroll: (e) => onScroll(e, false), ref: bodyScrollRef, scrollEventThrottle: 16, showsHorizontalScrollIndicator: true, style: {
|
|
139
144
|
flex: 1,
|
|
140
145
|
marginLeft: columnWidths.slice(0, pinnedColumns).reduce((sum, width) => sum + width, 0) +
|
|
141
146
|
(MoreContentContent ? 48 : 0),
|
|
142
|
-
}, children: _jsx(View, { children: data.map((row, rowIndex) => (_jsx(DataTableRow, { alternateRowBackground: alternateRowBackground, columns: columns.slice(pinnedColumns), columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, pinnedColumns: 0, rowData: row.slice(pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex }, `scrollable-${rowIndex}`))) }) })] }) }), MoreContentContent && (_jsx(Modal, { onDismiss: () => setModalRow(null), size: moreContentSize, visible: modalRow !== null, children: _jsx(MoreContentContent, Object.assign({ column: columns[0], rowData: data[modalRow], rowIndex: modalRow }, ((_a = moreContentExtraData === null || moreContentExtraData === void 0 ? void 0 : moreContentExtraData[modalRow]) !== null && _a !== void 0 ? _a : {}))) }))] }));
|
|
147
|
+
}, children: _jsx(View, { children: data.map((row, rowIndex) => (_jsx(DataTableRow, { alternateRowBackground: alternateRowBackground, columns: columns.slice(pinnedColumns), columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, pinnedColumns: 0, rowData: row.slice(pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex, testID: pinnedColumns === 0 ? resolveRowTestId(row, rowIndex) : undefined }, `scrollable-${rowIndex}`))) }) })] }) }), MoreContentContent && (_jsx(Modal, { onDismiss: () => setModalRow(null), size: moreContentSize, visible: modalRow !== null, children: _jsx(MoreContentContent, Object.assign({ column: columns[0], rowData: data[modalRow], rowIndex: modalRow }, ((_a = moreContentExtraData === null || moreContentExtraData === void 0 ? void 0 : moreContentExtraData[modalRow]) !== null && _a !== void 0 ? _a : {}))) }))] }));
|
|
143
148
|
};
|
|
144
|
-
export const DataTable = ({ data, columns, alternateRowBackground = true, totalPages = 1, page = 0, setPage, pinnedColumns = 0, sortColumn, setSortColumn, moreContentComponent, moreContentExtraData, customColumnComponentMap, rowHeight = 54, headerHeight, defaultTextSize = "md", }) => {
|
|
149
|
+
export const DataTable = ({ data, columns, alternateRowBackground = true, totalPages = 1, page = 0, setPage, pinnedColumns = 0, sortColumn, setSortColumn, moreContentComponent, moreContentExtraData, customColumnComponentMap, rowHeight = 54, headerHeight, defaultTextSize = "md", testID, testIDs, getRowTestID, }) => {
|
|
145
150
|
const { theme } = useTheme();
|
|
151
|
+
const tableTestIDs = resolveDataTableTestIDsFromProps({ testID, testIDs });
|
|
146
152
|
const headerScrollRef = useRef(null);
|
|
147
153
|
const bodyScrollRef = useRef(null);
|
|
148
154
|
const columnWidths = useMemo(() => columns.map((col) => col.width), [columns]);
|
|
@@ -180,16 +186,16 @@ export const DataTable = ({ data, columns, alternateRowBackground = true, totalP
|
|
|
180
186
|
const processedData = useMemo(() => {
|
|
181
187
|
return data.map((row) => row.map((cell) => (Object.assign(Object.assign({}, cell), { textSize: cell.textSize || defaultTextSize }))));
|
|
182
188
|
}, [data, defaultTextSize]);
|
|
183
|
-
return (_jsxs(View, { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [_jsxs(View, { style: {
|
|
189
|
+
return (_jsxs(View, { style: { display: "flex", flexDirection: "column", height: "100%" }, testID: tableTestIDs.root, children: [_jsxs(View, { style: {
|
|
184
190
|
borderColor: theme.border.default,
|
|
185
191
|
borderWidth: 1,
|
|
186
192
|
flex: 1,
|
|
187
193
|
height: "100%",
|
|
188
194
|
minHeight: 0,
|
|
189
|
-
}, children: [_jsx(DataTableHeader, { columns: columns, columnWidths: columnWidths, hasMoreContent: Boolean(moreContentComponent), headerHeight: headerHeight, headerScrollRef: headerScrollRef, onScroll: handleScroll, onSort: handleSort, pinnedColumns: pinnedColumns, rowHeight: rowHeight, sortColumn: sortColumn }), _jsx(View, { style: { flex: 1, minHeight: 0 }, children: _jsx(DataTableContent, { alternateRowBackground: alternateRowBackground, bodyScrollRef: bodyScrollRef, columns: columns, columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, data: processedData, moreContentComponent: moreContentComponent, moreContentExtraData: moreContentExtraData, onScroll: handleScroll, pinnedColumns: pinnedColumns, rowHeight: rowHeight }) })] }), Boolean(setPage && totalPages > 1) && (_jsx(View, { style: {
|
|
195
|
+
}, testID: tableTestIDs.body, children: [_jsx(DataTableHeader, { columns: columns, columnWidths: columnWidths, hasMoreContent: Boolean(moreContentComponent), headerHeight: headerHeight, headerScrollRef: headerScrollRef, onScroll: handleScroll, onSort: handleSort, pinnedColumns: pinnedColumns, rowHeight: rowHeight, sortColumn: sortColumn, testID: tableTestIDs.header }), _jsx(View, { style: { flex: 1, minHeight: 0 }, children: _jsx(DataTableContent, { alternateRowBackground: alternateRowBackground, bodyScrollRef: bodyScrollRef, columns: columns, columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, data: processedData, getRowTestID: getRowTestID, moreContentComponent: moreContentComponent, moreContentExtraData: moreContentExtraData, onScroll: handleScroll, pinnedColumns: pinnedColumns, rowHeight: rowHeight, rowTestIdBase: tableTestIDs.row }) })] }), Boolean(setPage && totalPages > 1) && (_jsx(View, { style: {
|
|
190
196
|
alignItems: "center",
|
|
191
197
|
height: 60,
|
|
192
198
|
padding: 16,
|
|
193
|
-
}, children: _jsx(Pagination, { page: page, setPage: setPage, totalPages: totalPages }) }))] }));
|
|
199
|
+
}, children: _jsx(Pagination, { page: page, setPage: setPage, testID: tableTestIDs.pagination, totalPages: totalPages }) }))] }));
|
|
194
200
|
};
|
|
195
201
|
//# sourceMappingURL=DataTable.js.map
|
package/dist/DataTable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../src/DataTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAU,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtE,OAAO,EAGL,SAAS,EACT,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AAErD,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAU1B,OAAO,EAA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UAAU,EACtB,MAAM,EAAE,YAAY,CAAC,MAAM,GAC3B,EAEF,KAAC,IAAI,IAAC,KAAK,EAAE,EAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAC,YAClC,KAAC,gBAAgB,IACf,sBAAsB,EAAE,sBAAsB,EAC9C,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,wBAAwB,EAAE,wBAAwB,EAClD,IAAI,EAAE,aAAa,EACnB,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,YAAY,CAAC,GAAG,GAC/B,GACG,IACF,EAEN,OAAO,CAAC,OAAO,IAAI,UAAU,GAAG,CAAC,CAAC,IAAI,CACrC,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,UAAU,EAAE,QAAQ;oBACpB,MAAM,EAAE,EAAE;oBACV,OAAO,EAAE,EAAE;iBACZ,YAED,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAQ,EACjB,MAAM,EAAE,YAAY,CAAC,UAAU,EAC/B,UAAU,EAAE,UAAU,GACtB,GACG,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/DateTimeField.js
CHANGED
|
@@ -23,6 +23,7 @@ import { SelectField } from "./SelectField";
|
|
|
23
23
|
import { Text } from "./Text";
|
|
24
24
|
import { useTheme } from "./Theme";
|
|
25
25
|
import { TimezonePicker } from "./TimezonePicker";
|
|
26
|
+
import { resolveFieldTestIDsFromProps } from "./testing/resolveTestId";
|
|
26
27
|
/**
|
|
27
28
|
* Visual separator rendered between date or time input segments.
|
|
28
29
|
* Displays "/" for date fields (MM/DD/YYYY) and ":" for time fields (hh:mm).
|
|
@@ -156,9 +157,10 @@ const DesktopTimeSection = ({ amPm, disabled, isMobile, onAmPmChange, onOpenActi
|
|
|
156
157
|
*
|
|
157
158
|
* All values are emitted as UTC ISO 8601 strings via the `onChange` callback.
|
|
158
159
|
*/
|
|
159
|
-
export const DateTimeField = ({ type, title, value, onChange, timezone: providedTimezone, onTimezoneChange, errorText, disabled, helperText, }) => {
|
|
160
|
+
export const DateTimeField = ({ type, title, value, onChange, timezone: providedTimezone, onTimezoneChange, errorText, disabled, helperText, testID, testIDs, }) => {
|
|
160
161
|
var _a;
|
|
161
162
|
const { theme } = useTheme();
|
|
163
|
+
const fieldTestIDs = resolveFieldTestIDsFromProps({ testID, testIDs });
|
|
162
164
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class is defined in ActionSheet.tsx which imports from Common.ts indirectly; using its type here would create a circular dependency
|
|
163
165
|
const dateActionSheetRef = React.createRef();
|
|
164
166
|
const [amPm, setAmPm] = useState("am");
|
|
@@ -615,7 +617,7 @@ export const DateTimeField = ({ type, title, value, onChange, timezone: provided
|
|
|
615
617
|
const openActionSheet = useCallback(() => {
|
|
616
618
|
setShowDate(true);
|
|
617
619
|
}, []);
|
|
618
|
-
return (_jsxs(_Fragment, { children: [Boolean(title) && _jsx(FieldTitle, { text: title }), Boolean(errorText) && _jsx(FieldError, { text: errorText }), isMobileTimeOnly && (_jsx(MobileTimeDisplay, { borderColor: borderColor, disabled: disabled, displayText: mobileTimeDisplayText, onPress: openActionSheet, placeholder: mobileTimePlaceholder })), !isMobileTimeOnly && (_jsxs(Pressable, Object.assign({}, (isMobileDatetime && {
|
|
620
|
+
return (_jsxs(_Fragment, { children: [Boolean(title) && _jsx(FieldTitle, { testID: fieldTestIDs.label, text: title }), Boolean(errorText) && _jsx(FieldError, { testID: fieldTestIDs.error, text: errorText }), isMobileTimeOnly && (_jsx(MobileTimeDisplay, { borderColor: borderColor, disabled: disabled, displayText: mobileTimeDisplayText, onPress: openActionSheet, placeholder: mobileTimePlaceholder })), !isMobileTimeOnly && (_jsxs(Pressable, Object.assign({}, (isMobileDatetime && {
|
|
619
621
|
accessibilityHint: "Opens date and time picker",
|
|
620
622
|
accessibilityLabel: "Date and time picker",
|
|
621
623
|
accessibilityRole: "button",
|
|
@@ -630,6 +632,6 @@ export const DateTimeField = ({ type, title, value, onChange, timezone: provided
|
|
|
630
632
|
minHeight: 40,
|
|
631
633
|
minWidth: isMobileDatetime ? 200 : minimumWidth,
|
|
632
634
|
paddingHorizontal: 6,
|
|
633
|
-
}, children: [showDateSection && (_jsx(DateRowWithIcon, { disabled: disabled, isMobile: parentIsLessThanBreakpointOrIsMobile, isMobileDatetime: isMobileDatetime, onOpenActionSheet: openActionSheet, segmentProps: segmentProps, type: type })), isMobileDatetime && (_jsx(View, { pointerEvents: "none", children: _jsx(MobileTimeDisplay, { disabled: disabled, displayText: mobileTimeDisplayText, onPress: openActionSheet, placeholder: mobileTimePlaceholder, showBorder: false }) })), showDesktopTime && (_jsx(DesktopTimeSection, { amPm: amPm, disabled: disabled, isMobile: parentIsLessThanBreakpointOrIsMobile, onAmPmChange: handleAmPmChange, onOpenActionSheet: openActionSheet, onTimezoneChange: handleTimezoneChange, segmentProps: segmentProps, timezone: timezone, type: type }))] }))), !disabled && (_jsx(DateTimeActionSheet, { actionSheetRef: dateActionSheetRef, onChange: onActionSheetChange, onDismiss: () => setShowDate(false), timezone: timezone, type: type, value: value, visible: showDate })), Boolean(helperText) && _jsx(FieldHelperText, { text: helperText })] }));
|
|
635
|
+
}, testID: fieldTestIDs.input, children: [showDateSection && (_jsx(DateRowWithIcon, { disabled: disabled, isMobile: parentIsLessThanBreakpointOrIsMobile, isMobileDatetime: isMobileDatetime, onOpenActionSheet: openActionSheet, segmentProps: segmentProps, type: type })), isMobileDatetime && (_jsx(View, { pointerEvents: "none", children: _jsx(MobileTimeDisplay, { disabled: disabled, displayText: mobileTimeDisplayText, onPress: openActionSheet, placeholder: mobileTimePlaceholder, showBorder: false }) })), showDesktopTime && (_jsx(DesktopTimeSection, { amPm: amPm, disabled: disabled, isMobile: parentIsLessThanBreakpointOrIsMobile, onAmPmChange: handleAmPmChange, onOpenActionSheet: openActionSheet, onTimezoneChange: handleTimezoneChange, segmentProps: segmentProps, timezone: timezone, type: type }))] }))), !disabled && (_jsx(DateTimeActionSheet, { actionSheetRef: dateActionSheetRef, onChange: onActionSheetChange, onDismiss: () => setShowDate(false), timezone: timezone, type: type, value: value, visible: showDate })), Boolean(helperText) && (_jsx(FieldHelperText, { testID: fieldTestIDs.helper, text: helperText }))] }));
|
|
634
636
|
};
|
|
635
637
|
//# sourceMappingURL=DateTimeField.js.map
|