@jobber/components-native 0.88.1 → 0.89.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.88.1",
3
+ "version": "0.89.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -94,5 +94,5 @@
94
94
  "react-native-safe-area-context": "^5.4.0",
95
95
  "react-native-svg": ">=12.0.0"
96
96
  },
97
- "gitHead": "02b60328dca8a6166794f853db3219e7b3f9bca1"
97
+ "gitHead": "11776ee31e17536a81a51c143933031f0601a270"
98
98
  }
@@ -38,6 +38,7 @@ import { useScrollToError } from "./hooks/useScrollToError";
38
38
  import { FormSaveButton } from "./components/FormSaveButton";
39
39
  import { useSaveButtonPosition } from "./hooks/useSaveButtonPosition";
40
40
  import { FormCache } from "./components/FormCache/FormCache";
41
+ import { useAtlantisFormContext } from "./context/AtlantisFormContext";
41
42
  import { InputAccessoriesProvider } from "../InputText";
42
43
  import { tokens } from "../utils/design";
43
44
  import { ErrorMessageProvider } from "../ErrorMessageWrapper";
@@ -102,12 +103,13 @@ function InternalForm({ children, onBeforeSubmit, onSubmit, onSubmitError, onSub
102
103
  setMessageBannerHeight(event.nativeEvent.layout.height);
103
104
  };
104
105
  const styles = useStyles();
106
+ const { edgeToEdgeEnabled } = useAtlantisFormContext();
105
107
  return (React.createElement(FormProvider, Object.assign({}, formMethods),
106
108
  React.createElement(React.Fragment, null,
107
109
  (isSubmitting || isSecondaryActionLoading) && React.createElement(FormMask, null),
108
110
  React.createElement(FormCache, { localCacheKey: localCacheKey, localCacheExclude: localCacheExclude, setLocalCache: setLocalCache }),
109
111
  React.createElement(FormBody, { keyboardHeight: calculateSaveButtonOffset(), submit: handleSubmit(internalSubmit), isFormSubmitting: isSubmitting, saveButtonLabel: saveButtonLabel, shouldRenderActionBar: saveButtonPosition === "sticky", renderStickySection: renderStickySection, secondaryActions: secondaryActions, setSecondaryActionLoading: setIsSecondaryActionLoading, setSaveButtonHeight: setSaveButtonHeight, saveButtonOffset: saveButtonOffset },
110
- React.createElement(KeyboardAwareScrollView, Object.assign({ enableResetScrollToCoords: false, enableAutomaticScroll: true, keyboardOpeningTime: Platform.OS === "ios" ? tokens["timing-slowest"] : 0, keyboardShouldPersistTaps: "handled", ref: scrollViewRef }, keyboardProps, { extraHeight: headerHeight, contentContainerStyle: !keyboardHeight && styles.scrollContentContainer }),
112
+ React.createElement(KeyboardAwareScrollView, Object.assign({ enableResetScrollToCoords: false, enableAutomaticScroll: true, enableOnAndroid: edgeToEdgeEnabled, keyboardOpeningTime: Platform.OS === "ios" ? tokens["timing-slowest"] : 0, keyboardShouldPersistTaps: "handled", ref: scrollViewRef }, keyboardProps, { extraHeight: headerHeight, extraScrollHeight: edgeToEdgeEnabled ? tokens["space-large"] : 0, contentContainerStyle: !keyboardHeight && styles.scrollContentContainer }),
111
113
  React.createElement(View, { onLayout: ({ nativeEvent }) => {
112
114
  setFormContentHeight(nativeEvent.layout.height);
113
115
  } },
@@ -8,6 +8,7 @@ export const atlantisFormContextDefaultValues = {
8
8
  setLocalCache: () => undefined,
9
9
  removeLocalCache: () => undefined,
10
10
  }),
11
+ edgeToEdgeEnabled: false,
11
12
  };
12
13
  export const AtlantisFormContext = createContext(atlantisFormContextDefaultValues);
13
14
  export function useAtlantisFormContext() {