@terreno/ui 57.21.0 → 58.0.0-beta.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/.ai/guidelines/core.md +1 -1
- package/CHANGELOG.md +43 -0
- package/dist/ActionSheet.d.ts +9 -9
- package/dist/ActionSheet.d.ts.map +1 -1
- package/dist/ActionSheet.js +11 -4
- package/dist/ActionSheet.js.map +1 -1
- package/dist/AnnouncementNavigator.d.ts +7 -1
- package/dist/AnnouncementNavigator.d.ts.map +1 -1
- package/dist/AnnouncementNavigator.js +15 -16
- package/dist/AnnouncementNavigator.js.map +1 -1
- package/dist/Avatar.d.ts.map +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/Box.d.ts.map +1 -1
- package/dist/Box.js +3 -1
- package/dist/Box.js.map +1 -1
- package/dist/Common.d.ts +16 -12
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/ConsentFormScreen.d.ts.map +1 -1
- package/dist/ConsentFormScreen.js.map +1 -1
- package/dist/ConsentNavigator.d.ts +5 -3
- package/dist/ConsentNavigator.d.ts.map +1 -1
- package/dist/ConsentNavigator.js +4 -4
- package/dist/ConsentNavigator.js.map +1 -1
- package/dist/CustomSelectField.js.map +1 -1
- package/dist/DataTable.d.ts.map +1 -1
- package/dist/DataTable.js +37 -12
- package/dist/DataTable.js.map +1 -1
- package/dist/DateTimeField.js.map +1 -1
- package/dist/DropdownPanel.d.ts +0 -5
- package/dist/DropdownPanel.d.ts.map +1 -1
- package/dist/DropdownPanel.js +0 -5
- package/dist/DropdownPanel.js.map +1 -1
- package/dist/FilterAccordion.d.ts.map +1 -1
- package/dist/FilterAccordion.js.map +1 -1
- package/dist/FilterBoolean.d.ts.map +1 -1
- package/dist/FilterBoolean.js.map +1 -1
- package/dist/FilterSelectMenu.js +1 -1
- package/dist/FilterSelectMenu.js.map +1 -1
- package/dist/GPTChat.d.ts.map +1 -1
- package/dist/GPTChat.js.map +1 -1
- package/dist/Heading.d.ts.map +1 -1
- package/dist/Heading.js +6 -12
- package/dist/Heading.js.map +1 -1
- package/dist/HeightField.d.ts.map +1 -1
- package/dist/HeightField.js +1 -1
- package/dist/HeightField.js.map +1 -1
- package/dist/Hyperlink.d.ts.map +1 -1
- package/dist/Hyperlink.js +6 -1
- package/dist/Hyperlink.js.map +1 -1
- package/dist/Image.d.ts +1 -1
- package/dist/MarkdownEditorField.d.ts.map +1 -1
- package/dist/MarkdownEditorField.js +1 -1
- package/dist/MarkdownEditorField.js.map +1 -1
- package/dist/OfflineBanner.d.ts +3 -2
- package/dist/OfflineBanner.d.ts.map +1 -1
- package/dist/OfflineBanner.js +3 -2
- package/dist/OfflineBanner.js.map +1 -1
- package/dist/OtpField.d.ts.map +1 -1
- package/dist/OtpField.js.map +1 -1
- package/dist/PickerSelect.d.ts +4 -4
- package/dist/PickerSelect.d.ts.map +1 -1
- package/dist/PickerSelect.js.map +1 -1
- package/dist/ProvisionalConsentSigner.d.ts +3 -2
- package/dist/ProvisionalConsentSigner.d.ts.map +1 -1
- package/dist/ProvisionalConsentSigner.js +2 -2
- package/dist/ProvisionalConsentSigner.js.map +1 -1
- package/dist/SidebarNavigation.js +2 -2
- package/dist/SidebarNavigation.js.map +1 -1
- package/dist/SidebarNavigation.native.js +2 -2
- package/dist/SidebarNavigation.native.js.map +1 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +27 -50
- package/dist/Text.js.map +1 -1
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js.map +1 -1
- package/dist/ThumbsUpDownFeedback.d.ts.map +1 -1
- package/dist/ThumbsUpDownFeedback.js.map +1 -1
- package/dist/ToastNotifications.d.ts.map +1 -1
- package/dist/ToastNotifications.js.map +1 -1
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Unifier.d.ts +1 -1
- package/dist/WebAddressAutocomplete.js.map +1 -1
- package/dist/WebDropdownMenu.d.ts +3 -3
- package/dist/WebDropdownMenu.d.ts.map +1 -1
- package/dist/WebDropdownMenu.js +1 -1
- package/dist/WebDropdownMenu.js.map +1 -1
- package/dist/announcementPlatform.d.ts +5 -0
- package/dist/announcementPlatform.d.ts.map +1 -1
- package/dist/announcementPlatform.js +9 -0
- package/dist/announcementPlatform.js.map +1 -1
- package/dist/asks/AskCard.d.ts +2 -2
- package/dist/asks/AskCard.d.ts.map +1 -1
- package/dist/dataTableColumnWidths.d.ts +76 -0
- package/dist/dataTableColumnWidths.d.ts.map +1 -0
- package/dist/dataTableColumnWidths.js +181 -0
- package/dist/dataTableColumnWidths.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/login/LoginScreen.js.map +1 -1
- package/dist/requestClient.d.ts +71 -0
- package/dist/requestClient.d.ts.map +1 -0
- package/dist/requestClient.js +139 -0
- package/dist/requestClient.js.map +1 -0
- package/dist/security/PasswordCard.d.ts.map +1 -1
- package/dist/security/PasswordCard.js.map +1 -1
- package/dist/security/TwoFactorSettingsCard.d.ts.map +1 -1
- package/dist/security/TwoFactorSettingsCard.js +1 -1
- package/dist/security/TwoFactorSettingsCard.js.map +1 -1
- package/dist/signUp/SignUpScreen.js.map +1 -1
- package/dist/table/Table.d.ts.map +1 -1
- package/dist/table/Table.js.map +1 -1
- package/dist/table/TableTitle.d.ts.map +1 -1
- package/dist/table/TableTitle.js +2 -1
- package/dist/table/TableTitle.js.map +1 -1
- package/dist/textFontSizes.d.ts +12 -0
- package/dist/textFontSizes.d.ts.map +1 -0
- package/dist/textFontSizes.js +21 -0
- package/dist/textFontSizes.js.map +1 -0
- package/dist/useAcknowledgeAnnouncement.d.ts +8 -63
- package/dist/useAcknowledgeAnnouncement.d.ts.map +1 -1
- package/dist/useAcknowledgeAnnouncement.js +31 -80
- package/dist/useAcknowledgeAnnouncement.js.map +1 -1
- package/dist/useAnnouncements.d.ts +14 -47
- package/dist/useAnnouncements.d.ts.map +1 -1
- package/dist/useAnnouncements.js +30 -57
- package/dist/useAnnouncements.js.map +1 -1
- package/dist/useConsentForms.d.ts +6 -38
- package/dist/useConsentForms.d.ts.map +1 -1
- package/dist/useConsentForms.js +25 -48
- package/dist/useConsentForms.js.map +1 -1
- package/dist/useProvisionalConsent.d.ts +7 -58
- package/dist/useProvisionalConsent.d.ts.map +1 -1
- package/dist/useProvisionalConsent.js +57 -67
- package/dist/useProvisionalConsent.js.map +1 -1
- package/dist/useSubmitConsent.d.ts +9 -39
- package/dist/useSubmitConsent.d.ts.map +1 -1
- package/dist/useSubmitConsent.js +10 -39
- package/dist/useSubmitConsent.js.map +1 -1
- package/package.json +38 -38
- package/src/ActionSheet.test.tsx +4 -4
- package/src/ActionSheet.tsx +18 -5
- package/src/AnnouncementNavigator.test.tsx +215 -315
- package/src/AnnouncementNavigator.tsx +25 -20
- package/src/Avatar.tsx +2 -9
- package/src/Box.test.tsx +3 -3
- package/src/Box.tsx +4 -2
- package/src/Common.ts +19 -15
- package/src/ConsentFormScreen.tsx +2 -1
- package/src/ConsentNavigator.test.tsx +166 -242
- package/src/ConsentNavigator.tsx +9 -13
- package/src/CustomSelectField.tsx +3 -3
- package/src/DataTable.test.tsx +69 -1
- package/src/DataTable.tsx +72 -19
- package/src/DateTimeField.tsx +4 -4
- package/src/DropdownPanel.tsx +0 -6
- package/src/FilterAccordion.tsx +3 -3
- package/src/FilterBoolean.tsx +3 -3
- package/src/FilterSelectMenu.tsx +1 -1
- package/src/GPTChat.tsx +10 -9
- package/src/Heading.tsx +7 -14
- package/src/HeightField.tsx +9 -2
- package/src/Hyperlink.tsx +6 -3
- package/src/Link.test.tsx +2 -2
- package/src/MarkdownEditorField.tsx +10 -2
- package/src/MarkdownView.test.tsx +10 -6
- package/src/Modal.test.tsx +3 -1
- package/src/ModalSheet.test.tsx +6 -6
- package/src/OfflineBanner.tsx +3 -2
- package/src/OtpField.tsx +2 -1
- package/src/PickerSelect.tsx +3 -2
- package/src/ProvisionalConsentSigner.test.tsx +140 -113
- package/src/ProvisionalConsentSigner.tsx +5 -4
- package/src/SidebarNavigation.native.tsx +2 -2
- package/src/SidebarNavigation.tsx +2 -2
- package/src/Skeleton.tsx +1 -1
- package/src/TapToEdit.test.tsx +2 -2
- package/src/Text.test.tsx +1 -1
- package/src/Text.tsx +25 -51
- package/src/TextField.tsx +2 -1
- package/src/ThumbsUpDownFeedback.tsx +3 -3
- package/src/ToastNotifications.tsx +3 -2
- package/src/ToastNotifications.webModal.test.tsx +4 -1
- package/src/Tooltip.tsx +2 -1
- package/src/UserInactivity.test.tsx +2 -3
- package/src/WebAddressAutocomplete.tsx +3 -3
- package/src/WebDropdownMenu.tsx +16 -5
- package/src/__snapshots__/DataTable.test.tsx.snap +13 -0
- package/src/announcementPlatform.ts +10 -0
- package/src/asks/AskCard.test.tsx +14 -12
- package/src/asks/AskCard.tsx +2 -2
- package/src/bunSetup.ts +42 -0
- package/src/dataTableColumnWidths.test.ts +266 -0
- package/src/dataTableColumnWidths.ts +272 -0
- package/src/index.tsx +9 -2
- package/src/login/LoginScreen.tsx +2 -2
- package/src/requestClient.test.ts +288 -0
- package/src/requestClient.ts +228 -0
- package/src/security/PasswordCard.tsx +7 -5
- package/src/security/TwoFactorSettingsCard.tsx +10 -3
- package/src/signUp/SignUpScreen.tsx +2 -2
- package/src/table/Table.tsx +1 -2
- package/src/table/TableTitle.tsx +2 -1
- package/src/test-utils.tsx +76 -0
- package/src/textFontSizes.ts +31 -0
- package/src/useAcknowledgeAnnouncement.test.ts +101 -193
- package/src/useAcknowledgeAnnouncement.ts +69 -147
- package/src/useAnnouncements.test.ts +122 -186
- package/src/useAnnouncements.ts +49 -105
- package/src/useConsentForms.test.ts +59 -112
- package/src/useConsentForms.ts +37 -87
- package/src/useProvisionalConsent.test.ts +74 -150
- package/src/useProvisionalConsent.ts +79 -125
- package/src/useSubmitConsent.test.ts +59 -85
- package/src/useSubmitConsent.ts +22 -77
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "./announcementFrequency";
|
|
12
12
|
import {Box} from "./Box";
|
|
13
13
|
import {Button} from "./Button";
|
|
14
|
+
import type {TerrenoRequestClient} from "./requestClient";
|
|
14
15
|
import {Spinner} from "./Spinner";
|
|
15
16
|
import {Text} from "./Text";
|
|
16
17
|
import {useAcknowledgeAnnouncement} from "./useAcknowledgeAnnouncement";
|
|
@@ -19,7 +20,12 @@ import {useAnnouncements} from "./useAnnouncements";
|
|
|
19
20
|
export type {AnnouncementFrequencyConfig} from "./announcementFrequency";
|
|
20
21
|
|
|
21
22
|
interface AnnouncementNavigatorProps {
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Request client for the announcement routes, usually the app's `@terreno/syncdb/api`
|
|
25
|
+
* client (`createApiClient(...)`). Any object with a matching `request` method works.
|
|
26
|
+
*/
|
|
27
|
+
client: TerrenoRequestClient;
|
|
28
|
+
/** Path prefixed to the announcement routes (for example `/api`); defaults to none. */
|
|
23
29
|
baseUrl?: string;
|
|
24
30
|
children: React.ReactNode;
|
|
25
31
|
frequency?: AnnouncementFrequencyConfig;
|
|
@@ -27,18 +33,15 @@ interface AnnouncementNavigatorProps {
|
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export const AnnouncementNavigator: React.FC<AnnouncementNavigatorProps> = ({
|
|
30
|
-
|
|
36
|
+
client,
|
|
31
37
|
baseUrl,
|
|
32
38
|
children,
|
|
33
39
|
frequency,
|
|
34
40
|
onError,
|
|
35
41
|
}) => {
|
|
36
|
-
const {pending, isLoading, error, refetch} = useAnnouncements(
|
|
37
|
-
api as Parameters<typeof useAnnouncements>[0],
|
|
38
|
-
baseUrl
|
|
39
|
-
);
|
|
42
|
+
const {pending, isLoading, error, refetch} = useAnnouncements(client, baseUrl);
|
|
40
43
|
const {acknowledge, recordClick, recordImpression, isSubmitting} = useAcknowledgeAnnouncement(
|
|
41
|
-
|
|
44
|
+
client,
|
|
42
45
|
baseUrl
|
|
43
46
|
);
|
|
44
47
|
|
|
@@ -67,8 +70,14 @@ export const AnnouncementNavigator: React.FC<AnnouncementNavigatorProps> = ({
|
|
|
67
70
|
? `${currentAnnouncementId}:${currentAnnouncementVersion}`
|
|
68
71
|
: null;
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
// Frequency result for one impression key. A result for an older key (or none yet) means
|
|
74
|
+
// the current announcement has not been checked, so it stays hidden until it is.
|
|
75
|
+
const [frequencyResult, setFrequencyResult] = useState<{
|
|
76
|
+
key: string;
|
|
77
|
+
suppressed: boolean;
|
|
78
|
+
} | null>(null);
|
|
79
|
+
const isFrequencyChecked = impressionKey !== null && frequencyResult?.key === impressionKey;
|
|
80
|
+
const isFrequencySuppressed = frequencyResult?.suppressed ?? false;
|
|
72
81
|
|
|
73
82
|
const visibleCurrent = current && isFrequencyChecked && !isFrequencySuppressed ? current : null;
|
|
74
83
|
const displayMode = visibleCurrent?.displayMode ?? "modal";
|
|
@@ -77,31 +86,27 @@ export const AnnouncementNavigator: React.FC<AnnouncementNavigatorProps> = ({
|
|
|
77
86
|
|
|
78
87
|
const isShowingAnnouncement = !isLoading && !error && Boolean(visibleCurrent);
|
|
79
88
|
|
|
80
|
-
// Apply client-side frequency caps before showing an interrupt surface.
|
|
89
|
+
// Apply client-side frequency caps before showing an interrupt surface. Keyed on the
|
|
90
|
+
// announcement version so a refetch returning the same announcement is not re-checked.
|
|
81
91
|
useEffect(() => {
|
|
82
|
-
if (!
|
|
83
|
-
setIsFrequencySuppressed(false);
|
|
84
|
-
setIsFrequencyChecked(true);
|
|
92
|
+
if (!impressionKey) {
|
|
85
93
|
return;
|
|
86
94
|
}
|
|
87
95
|
|
|
88
96
|
let cancelled = false;
|
|
89
|
-
setIsFrequencyChecked(false);
|
|
90
97
|
|
|
91
98
|
const evaluateFrequency = async (): Promise<void> => {
|
|
92
99
|
try {
|
|
93
|
-
const
|
|
100
|
+
const suppressed = await shouldSuppressInterrupt(frequencyConfig, impressionKey);
|
|
94
101
|
if (!cancelled) {
|
|
95
|
-
|
|
96
|
-
setIsFrequencyChecked(true);
|
|
102
|
+
setFrequencyResult({key: impressionKey, suppressed});
|
|
97
103
|
}
|
|
98
104
|
} catch (frequencyError) {
|
|
99
105
|
console.warn("[AnnouncementNavigator] Frequency check failed; allowing interrupt", {
|
|
100
106
|
frequencyError,
|
|
101
107
|
});
|
|
102
108
|
if (!cancelled) {
|
|
103
|
-
|
|
104
|
-
setIsFrequencyChecked(true);
|
|
109
|
+
setFrequencyResult({key: impressionKey, suppressed: false});
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
};
|
|
@@ -111,7 +116,7 @@ export const AnnouncementNavigator: React.FC<AnnouncementNavigatorProps> = ({
|
|
|
111
116
|
return () => {
|
|
112
117
|
cancelled = true;
|
|
113
118
|
};
|
|
114
|
-
}, [
|
|
119
|
+
}, [frequencyConfig, impressionKey]);
|
|
115
120
|
|
|
116
121
|
// Record session/cooldown state once per announcement version when the interrupt is visible.
|
|
117
122
|
useEffect(() => {
|
package/src/Avatar.tsx
CHANGED
|
@@ -3,14 +3,7 @@ import {launchImageLibraryAsync} from "expo-image-picker";
|
|
|
3
3
|
import {LinearGradient} from "expo-linear-gradient";
|
|
4
4
|
import type React from "react";
|
|
5
5
|
import {type FC, useState} from "react";
|
|
6
|
-
import {
|
|
7
|
-
Image,
|
|
8
|
-
type ImageErrorEventData,
|
|
9
|
-
type NativeSyntheticEvent,
|
|
10
|
-
Pressable,
|
|
11
|
-
Text,
|
|
12
|
-
View,
|
|
13
|
-
} from "react-native";
|
|
6
|
+
import {Image, type ImageErrorEvent, Pressable, Text, View} from "react-native";
|
|
14
7
|
|
|
15
8
|
import type {AvatarProps, CustomSvgProps} from "./Common";
|
|
16
9
|
import {Icon} from "./Icon";
|
|
@@ -98,7 +91,7 @@ export const Avatar: FC<AvatarProps> = ({
|
|
|
98
91
|
console.warn("Avatars with the status of 'imagePicker' should also have an onChange property.");
|
|
99
92
|
}
|
|
100
93
|
|
|
101
|
-
const handleImageError = (event:
|
|
94
|
+
const handleImageError = (event: ImageErrorEvent) => {
|
|
102
95
|
setIsImageLoaded(false);
|
|
103
96
|
console.warn("Image load error: ", event);
|
|
104
97
|
};
|
package/src/Box.test.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import {describe, expect, it, mock, spyOn} from "bun:test";
|
|
|
2
2
|
import {act, fireEvent} from "@testing-library/react-native";
|
|
3
3
|
import {assert} from "chai";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import {Platform, type
|
|
5
|
+
import {Platform, type ScrollViewInstance} from "react-native";
|
|
6
6
|
|
|
7
7
|
import {Box} from "./Box";
|
|
8
8
|
import {sharedResponsiveBreakpointStore} from "./ResponsiveBreakpoint";
|
|
@@ -753,7 +753,7 @@ describe("Box", () => {
|
|
|
753
753
|
// values: a ref object in style is cyclical (host instance points back at the
|
|
754
754
|
// node) and gets dev-frozen, so React throws when detaching it on unmount.
|
|
755
755
|
it("should keep behavior props out of the ScrollView style", () => {
|
|
756
|
-
const scrollRef = React.createRef<
|
|
756
|
+
const scrollRef = React.createRef<ScrollViewInstance>();
|
|
757
757
|
const {root} = renderWithTheme(
|
|
758
758
|
<Box onScroll={mock(() => {})} scroll scrollRef={scrollRef}>
|
|
759
759
|
<Text>Scrollable</Text>
|
|
@@ -845,7 +845,7 @@ describe("Box", () => {
|
|
|
845
845
|
const scrollToEnd = mock(() => {});
|
|
846
846
|
const scrollRef = {
|
|
847
847
|
current: {scrollTo, scrollToEnd},
|
|
848
|
-
} as unknown as React.RefObject<
|
|
848
|
+
} as unknown as React.RefObject<ScrollViewInstance>;
|
|
849
849
|
const ref = React.createRef<BoxScrollHandle>();
|
|
850
850
|
// Intentionally omit `scroll` so the ScrollView does not claim `scrollRef`
|
|
851
851
|
// and overwrite `.current`; the imperative handle still reads it.
|
package/src/Box.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Pressable,
|
|
7
7
|
SafeAreaView,
|
|
8
8
|
ScrollView,
|
|
9
|
+
type ScrollViewInstance,
|
|
9
10
|
View,
|
|
10
11
|
type ViewStyle,
|
|
11
12
|
} from "react-native";
|
|
@@ -156,7 +157,7 @@ const boxStyleMapCache = new WeakMap<object, BoxStyleMap>();
|
|
|
156
157
|
const BoxComponent = React.forwardRef((props: BoxProps, ref) => {
|
|
157
158
|
const {theme} = useTheme();
|
|
158
159
|
const resolvedTestID = props.testID;
|
|
159
|
-
const internalScrollRef = useRef<
|
|
160
|
+
const internalScrollRef = useRef<ScrollViewInstance>(null);
|
|
160
161
|
const scrollRef = props.scrollRef ?? internalScrollRef;
|
|
161
162
|
const hasResponsiveDirection = Boolean(
|
|
162
163
|
props.smDirection || props.mdDirection || props.lgDirection || props.xlDirection
|
|
@@ -508,7 +509,8 @@ const BoxComponent = React.forwardRef((props: BoxProps, ref) => {
|
|
|
508
509
|
: {};
|
|
509
510
|
box = (
|
|
510
511
|
<Pressable
|
|
511
|
-
|
|
512
|
+
// RN 0.88 types `onKeyDown` with a native event that has no `key`; RNW passes the DOM event.
|
|
513
|
+
{...(toggleKeyDownProps as object)}
|
|
512
514
|
accessibilityHint={(props as AccessibilityProps).accessibilityHint}
|
|
513
515
|
{...(explicitAccessibilityRole
|
|
514
516
|
? {accessibilityRole: explicitAccessibilityRole as never}
|
package/src/Common.ts
CHANGED
|
@@ -4,16 +4,16 @@ import type {CountryCode} from "libphonenumber-js";
|
|
|
4
4
|
import type React from "react";
|
|
5
5
|
import type {ComponentProps, FC, ReactElement, ReactNode} from "react";
|
|
6
6
|
import type {
|
|
7
|
+
DimensionValue,
|
|
7
8
|
ImageStyle,
|
|
8
9
|
ListRenderItemInfo,
|
|
9
|
-
|
|
10
|
-
ScrollView,
|
|
10
|
+
ScrollViewInstance,
|
|
11
11
|
StyleProp,
|
|
12
|
-
|
|
12
|
+
TextInputInstance,
|
|
13
|
+
TextInstance,
|
|
13
14
|
TextStyle,
|
|
14
15
|
ViewStyle,
|
|
15
16
|
} from "react-native";
|
|
16
|
-
import type {DimensionValue} from "react-native/Libraries/StyleSheet/StyleSheetTypes";
|
|
17
17
|
import type {Styles} from "react-native-google-places-autocomplete";
|
|
18
18
|
import type {SvgProps} from "react-native-svg";
|
|
19
19
|
|
|
@@ -607,11 +607,6 @@ export interface DropdownPanelProps extends WithTestID {
|
|
|
607
607
|
maxPanelHeight?: number;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
/**
|
|
611
|
-
* @deprecated Renamed to {@link DropdownPanelProps}. Removed in Terreno 58.
|
|
612
|
-
*/
|
|
613
|
-
export type FilterProps = DropdownPanelProps;
|
|
614
|
-
|
|
615
610
|
export type AlignContent = "start" | "end" | "center" | "between" | "around" | "stretch";
|
|
616
611
|
export type AlignSelf = "auto" | "start" | "end" | "center" | "baseline" | "stretch";
|
|
617
612
|
export type AlignItems = "start" | "end" | "center" | "baseline" | "stretch";
|
|
@@ -944,7 +939,8 @@ export interface BoxPropsBase extends WithTestID, LoadingProps {
|
|
|
944
939
|
|
|
945
940
|
avoidKeyboard?: boolean;
|
|
946
941
|
keyboardOffset?: number;
|
|
947
|
-
|
|
942
|
+
/** Native ScrollView instance (RN 0.87 `ScrollViewInstance`). */
|
|
943
|
+
scrollRef?: React.RefObject<ScrollViewInstance | null>;
|
|
948
944
|
onScroll?: (offsetY: number) => void;
|
|
949
945
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
950
946
|
}
|
|
@@ -1198,7 +1194,8 @@ export interface TextFieldProps extends BaseFieldProps, HelperTextProps, ErrorTe
|
|
|
1198
1194
|
multiline?: boolean;
|
|
1199
1195
|
rows?: number;
|
|
1200
1196
|
|
|
1201
|
-
|
|
1197
|
+
/** Native TextInput instance (RN 0.87 `TextInputInstance`). */
|
|
1198
|
+
inputRef?: (ref: TextInputInstance | null) => void;
|
|
1202
1199
|
trimOnBlur?: boolean;
|
|
1203
1200
|
/** Renders the value in a monospace face with tracking, for codes such as backup codes. */
|
|
1204
1201
|
mono?: boolean;
|
|
@@ -3247,7 +3244,11 @@ export interface DataTableQueryParams {
|
|
|
3247
3244
|
export interface DataTableColumn {
|
|
3248
3245
|
title: string;
|
|
3249
3246
|
columnType: "text" | "number" | "date" | "boolean" | string;
|
|
3250
|
-
|
|
3247
|
+
/**
|
|
3248
|
+
* Fixed column width in pixels. Omit it to size the column from its title and a sample of its
|
|
3249
|
+
* content; auto-sized columns then grow to fill the table's container.
|
|
3250
|
+
*/
|
|
3251
|
+
width?: number;
|
|
3251
3252
|
highlight?: SurfaceColor;
|
|
3252
3253
|
sortable?: boolean;
|
|
3253
3254
|
infoModalText?: string;
|
|
@@ -3422,7 +3423,7 @@ export interface TextProps extends WithTestID {
|
|
|
3422
3423
|
* The native text, for example to move screen reader focus to it with
|
|
3423
3424
|
* `AccessibilityInfo.setAccessibilityFocus`.
|
|
3424
3425
|
*/
|
|
3425
|
-
ref?: React.Ref<
|
|
3426
|
+
ref?: React.Ref<TextInstance>;
|
|
3426
3427
|
skipLinking?: boolean;
|
|
3427
3428
|
}
|
|
3428
3429
|
|
|
@@ -3906,8 +3907,8 @@ export interface SelectFieldPropsBase extends WithTestID {
|
|
|
3906
3907
|
/**
|
|
3907
3908
|
* Web only. When true, the dropdown menu renders in a fixed portal on
|
|
3908
3909
|
* `document.body` (zIndex 9999) instead of a React Native `Modal`. Use this
|
|
3909
|
-
* when the select lives inside another portaled/high-zIndex overlay (e.g.
|
|
3910
|
-
* `
|
|
3910
|
+
* when the select lives inside another portaled/high-zIndex overlay (e.g. a
|
|
3911
|
+
* `DropdownPanel`) where a `Modal` would stack behind the overlay and be
|
|
3911
3912
|
* invisible and unclickable.
|
|
3912
3913
|
* @default false
|
|
3913
3914
|
*/
|
|
@@ -4223,6 +4224,9 @@ export interface SidebarNavigationProps {
|
|
|
4223
4224
|
onNavigate?: (route: string) => void;
|
|
4224
4225
|
/**
|
|
4225
4226
|
* The route to show when the navigator first renders.
|
|
4227
|
+
*
|
|
4228
|
+
* Expo Router 58 ignores this on `Navigator`. Set
|
|
4229
|
+
* `unstable_settings.initialRouteName` on the layout file instead.
|
|
4226
4230
|
*/
|
|
4227
4231
|
initialRouteName?: string;
|
|
4228
4232
|
/**
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Platform,
|
|
8
8
|
Pressable,
|
|
9
9
|
ScrollView,
|
|
10
|
+
type ScrollViewInstance,
|
|
10
11
|
View,
|
|
11
12
|
} from "react-native";
|
|
12
13
|
|
|
@@ -47,7 +48,7 @@ export const ConsentFormScreen: React.FC<ConsentFormScreenProps> = ({
|
|
|
47
48
|
const [layoutHeight, setLayoutHeight] = useState(0);
|
|
48
49
|
const [isMarkdownLoaded, setIsMarkdownLoaded] = useState(false);
|
|
49
50
|
const lastContentHeightRef = useRef(0);
|
|
50
|
-
const scrollViewRef = useRef<
|
|
51
|
+
const scrollViewRef = useRef<ScrollViewInstance>(null);
|
|
51
52
|
|
|
52
53
|
const rawContent = form.content[locale] ?? form.content[form.defaultLocale] ?? "";
|
|
53
54
|
const content = applyConsentVariables(rawContent, variables);
|