@jobber/components-native 0.95.2 → 0.95.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.95.2",
3
+ "version": "0.95.3",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -96,5 +96,5 @@
96
96
  "react-native-safe-area-context": "^5.4.0",
97
97
  "react-native-svg": ">=12.0.0"
98
98
  },
99
- "gitHead": "33b55b62a1a0046c1021d15feba75d331123e89d"
99
+ "gitHead": "d082bc71718efe42e118b1f3adcd9007bb1923cb"
100
100
  }
@@ -39,6 +39,7 @@ import { FormSaveButton } from "./components/FormSaveButton";
39
39
  import { useSaveButtonPosition } from "./hooks/useSaveButtonPosition";
40
40
  import { FormCache } from "./components/FormCache/FormCache";
41
41
  import { useAtlantisFormContext } from "./context/AtlantisFormContext";
42
+ import { IOSKeyboardAwareScrollViewSpacer } from "./components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer";
42
43
  import { InputAccessoriesProvider } from "../InputText";
43
44
  import { tokens } from "../utils/design";
44
45
  import { ErrorMessageProvider } from "../ErrorMessageWrapper";
@@ -120,7 +121,9 @@ function InternalForm({ children, onBeforeSubmit, onSubmit, onSubmitError, onSub
120
121
  React.createElement(View, { style: styles.formChildContainer },
121
122
  React.createElement(React.Fragment, null,
122
123
  React.createElement(View, { style: styles.formContent }, children),
123
- saveButtonPosition === "inline" && (React.createElement(View, { style: styles.fixedSaveButton }, renderStickySection ? (renderStickySection(handleSubmit(internalSubmit), saveButtonLabel, isSubmitting)) : (React.createElement(FormSaveButton, { primaryAction: handleSubmit(internalSubmit), label: saveButtonLabel, loading: isSubmitting, secondaryActions: secondaryActions, setSecondaryActionLoading: setIsSecondaryActionLoading, onOpenBottomSheet: () => setIsBottomSheetOpen(true), onCloseBottomSheet: () => setIsBottomSheetOpen(false) })))),
124
+ saveButtonPosition === "inline" && (React.createElement(View, { style: styles.fixedSaveButton },
125
+ renderStickySection ? (renderStickySection(handleSubmit(internalSubmit), saveButtonLabel, isSubmitting)) : (React.createElement(FormSaveButton, { primaryAction: handleSubmit(internalSubmit), label: saveButtonLabel, loading: isSubmitting, secondaryActions: secondaryActions, setSecondaryActionLoading: setIsSecondaryActionLoading, onOpenBottomSheet: () => setIsBottomSheetOpen(true), onCloseBottomSheet: () => setIsBottomSheetOpen(false) })),
126
+ disableKeyboardAwareScroll && (React.createElement(IOSKeyboardAwareScrollViewSpacer, null)))),
124
127
  renderFooter))),
125
128
  React.createElement(View, { style: styles.safeArea, ref: bottomViewRef })))),
126
129
  React.createElement(FormMessage, null)));
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { Platform, View } from "react-native";
3
+ /**
4
+ * This is a spacer to help prevent issues with the KeyboardAwareScrollView on iOS.
5
+ * This will be removed as a part of JOB-147156
6
+ */
7
+ export function IOSKeyboardAwareScrollViewSpacer() {
8
+ if (Platform.OS === "ios") {
9
+ return React.createElement(View, { style: { height: 400 } });
10
+ }
11
+ return null;
12
+ }