@jobber/components-native 0.85.1-move-dupli-99be0f8.13 → 0.86.1-JOB-136074-c379982.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.85.1-move-dupli-99be0f8.13+99be0f87a",
3
+ "version": "0.86.1-JOB-136074-c379982.0+c379982e9",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -53,6 +53,7 @@
53
53
  "ts-xor": "^1.1.0"
54
54
  },
55
55
  "devDependencies": {
56
+ "@react-native-community/datetimepicker": "^7.1.0",
56
57
  "@storybook/addon-a11y": "^9.1.2",
57
58
  "@storybook/react": "^9.1.2",
58
59
  "@storybook/react-native-web-vite": "^9.1.2",
@@ -66,6 +67,13 @@
66
67
  "date-fns": "^2.30.0",
67
68
  "date-fns-tz": "^2.0.0",
68
69
  "metro-react-native-babel-preset": "^0.76.0",
70
+ "react-native": "^0.77.0",
71
+ "react-native-gesture-handler": "^2.10.2",
72
+ "react-native-modal-datetime-picker": "^15.0.1",
73
+ "react-native-reanimated": "^3.7.1",
74
+ "react-native-safe-area-context": "^5.4.0",
75
+ "react-native-svg": "^15.1.0",
76
+ "react-native-web": "^0.20.0",
69
77
  "react-test-renderer": "^18.2.0",
70
78
  "storybook": "^9.1.2"
71
79
  },
@@ -78,6 +86,7 @@
78
86
  "react": "^18.2.0",
79
87
  "react-intl": "^6.4.2",
80
88
  "react-native": ">=0.76.0",
89
+ "react-native-build-config": "^0.3.2",
81
90
  "react-native-gesture-handler": ">=2.10.0",
82
91
  "react-native-keyboard-aware-scroll-view": "^0.9.5",
83
92
  "react-native-modal-datetime-picker": " >=13.0.0",
@@ -87,5 +96,10 @@
87
96
  "react-native-safe-area-context": "^5.4.0",
88
97
  "react-native-svg": ">=12.0.0"
89
98
  },
90
- "gitHead": "99be0f87adc5047e339f84deab23a6cdaeb8ba22"
99
+ "peerDependenciesMeta": {
100
+ "react-native-build-config": {
101
+ "optional": true
102
+ }
103
+ },
104
+ "gitHead": "c379982e9d83ceef1ec4ffa08f53ce98ed914d8c"
91
105
  }
@@ -48,5 +48,7 @@ function getBannerIcon(type) {
48
48
  return "help";
49
49
  case "error":
50
50
  return "alert";
51
+ case "success":
52
+ return "checkmark";
51
53
  }
52
54
  }
@@ -14,5 +14,8 @@ export const useStyles = buildThemedStyles(tokens => {
14
14
  notice: {
15
15
  backgroundColor: tokens["color-informative"],
16
16
  },
17
+ success: {
18
+ backgroundColor: tokens["color-success"],
19
+ },
17
20
  };
18
21
  });
@@ -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 { isEdgeToEdgeEnabled } from "../utils/buildConfig/isEdgeToEdgeEnabled";
41
42
  import { InputAccessoriesProvider } from "../InputText";
42
43
  import { tokens } from "../utils/design";
43
44
  import { ErrorMessageProvider } from "../ErrorMessageWrapper";
@@ -102,12 +103,14 @@ function InternalForm({ children, onBeforeSubmit, onSubmit, onSubmitError, onSub
102
103
  setMessageBannerHeight(event.nativeEvent.layout.height);
103
104
  };
104
105
  const styles = useStyles();
106
+ // Check if edge-to-edge is enabled using utility function
107
+ const edgeToEdgeEnabled = isEdgeToEdgeEnabled();
105
108
  return (React.createElement(FormProvider, Object.assign({}, formMethods),
106
109
  React.createElement(React.Fragment, null,
107
110
  (isSubmitting || isSecondaryActionLoading) && React.createElement(FormMask, null),
108
111
  React.createElement(FormCache, { localCacheKey: localCacheKey, localCacheExclude: localCacheExclude, setLocalCache: setLocalCache }),
109
112
  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 }),
113
+ 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 ? 20 : 0, contentContainerStyle: !keyboardHeight && styles.scrollContentContainer }),
111
114
  React.createElement(View, { onLayout: ({ nativeEvent }) => {
112
115
  setFormContentHeight(nativeEvent.layout.height);
113
116
  } },
@@ -36,6 +36,7 @@ export const useStyles = buildThemedStyles(tokens => {
36
36
  right: 0,
37
37
  bottom: 0,
38
38
  left: 0,
39
+ zIndex: 1,
39
40
  },
40
41
  miniLabel: {
41
42
  top: 0,
@@ -44,7 +45,6 @@ export const useStyles = buildThemedStyles(tokens => {
44
45
  marginRight: tokens["space-small"],
45
46
  maxHeight: (typographyStyles.defaultSize.lineHeight || 0) +
46
47
  tokens["space-smaller"],
47
- zIndex: 1,
48
48
  },
49
49
  // Prevents the miniLabel from cutting off the ClearAction button
50
50
  miniLabelShowClearAction: {
@@ -0,0 +1,18 @@
1
+ import { Platform } from "react-native";
2
+ function loadBuildConfig() {
3
+ var _a;
4
+ try {
5
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
6
+ const mod = require("react-native-build-config");
7
+ return ((_a = mod === null || mod === void 0 ? void 0 : mod.default) !== null && _a !== void 0 ? _a : mod);
8
+ }
9
+ catch (_b) {
10
+ return null; // module not installed or not linked
11
+ }
12
+ }
13
+ export function isEdgeToEdgeEnabled() {
14
+ if (Platform.OS !== "android")
15
+ return false;
16
+ const cfg = loadBuildConfig();
17
+ return !!(cfg === null || cfg === void 0 ? void 0 : cfg.IS_EDGE_TO_EDGE_ENABLED);
18
+ }