@jobber/components-native 0.75.0 → 0.75.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.
Files changed (77) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/Disclosure/Disclosure.js +2 -2
  3. package/dist/src/Form/components/FormCache/FormCache.js +0 -2
  4. package/dist/src/FormatFile/components/_mocks/mockFiles.js +1 -1
  5. package/dist/src/Heading/Heading.js +2 -2
  6. package/dist/src/Text/Text.js +2 -2
  7. package/dist/src/Typography/Typography.js +2 -4
  8. package/dist/src/utils/test/wait.js +2 -2
  9. package/dist/tsconfig.tsbuildinfo +1 -1
  10. package/dist/types/src/ActionLabel/ActionLabel.d.ts +0 -1
  11. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +0 -1
  12. package/dist/types/src/AtlantisContext/AtlantisContext.d.ts +0 -1
  13. package/dist/types/src/AutoLink/AutoLink.d.ts +0 -1
  14. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +0 -1
  15. package/dist/types/src/AutoLink/components/Link/Link.d.ts +0 -1
  16. package/dist/types/src/Banner/Banner.d.ts +0 -1
  17. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +0 -1
  18. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +0 -1
  19. package/dist/types/src/Button/Button.d.ts +0 -1
  20. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +0 -1
  21. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +0 -1
  22. package/dist/types/src/Checkbox/Checkbox.d.ts +0 -1
  23. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +0 -1
  24. package/dist/types/src/Chip/Chip.d.ts +0 -1
  25. package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +3 -2
  26. package/dist/types/src/Divider/Divider.d.ts +0 -1
  27. package/dist/types/src/EmptyState/EmptyState.d.ts +0 -1
  28. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageContext.d.ts +0 -1
  29. package/dist/types/src/Form/Form.d.ts +0 -1
  30. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +0 -1
  31. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +0 -1
  32. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +0 -1
  33. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +0 -1
  34. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +0 -1
  35. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +0 -2
  36. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +0 -1
  37. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +0 -1
  38. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +0 -1
  39. package/dist/types/src/Form/context/AtlantisFormContext.d.ts +0 -1
  40. package/dist/types/src/FormatFile/FormatFile.d.ts +0 -1
  41. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +0 -1
  42. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +0 -1
  43. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +0 -1
  44. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +0 -2
  45. package/dist/types/src/FormatFile/components/_mocks/mockFiles.d.ts +4 -4
  46. package/dist/types/src/FormatFile/context/FormatFileContext.d.ts +0 -1
  47. package/dist/types/src/Glimmer/Glimmer.d.ts +0 -1
  48. package/dist/types/src/Heading/Heading.d.ts +0 -1
  49. package/dist/types/src/Icon/Icon.d.ts +0 -1
  50. package/dist/types/src/InputCurrency/InputCurrency.d.ts +0 -1
  51. package/dist/types/src/InputDate/InputDate.d.ts +0 -1
  52. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +0 -1
  53. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +0 -1
  54. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +0 -1
  55. package/dist/types/src/InputSearch/components/FilterButton.d.ts +0 -1
  56. package/dist/types/src/InputText/context/InputAccessoriesContext.d.ts +0 -1
  57. package/dist/types/src/InputTime/InputTime.d.ts +0 -1
  58. package/dist/types/src/Menu/Menu.d.ts +0 -1
  59. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +0 -1
  60. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +0 -1
  61. package/dist/types/src/Menu/types.d.ts +0 -1
  62. package/dist/types/src/ProgressBar/ProgressBar.d.ts +0 -1
  63. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +0 -1
  64. package/dist/types/src/ProgressBar/ProgressBarStepped.d.ts +0 -1
  65. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +0 -1
  66. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +0 -1
  67. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +0 -1
  68. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +0 -1
  69. package/dist/types/src/StatusLabel/StatusLabel.d.ts +0 -1
  70. package/dist/types/src/Switch/Switch.d.ts +0 -1
  71. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +0 -1
  72. package/dist/types/src/Text/Text.d.ts +0 -1
  73. package/dist/types/src/TextList/TextList.d.ts +0 -1
  74. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +0 -1
  75. package/dist/types/src/Toast/Toast.d.ts +0 -1
  76. package/package.json +2 -2
  77. package/src/Form/components/FormCache/FormCache.tsx +0 -2
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.75.0",
3
+ "version": "0.75.1",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -79,5 +79,5 @@
79
79
  "react-native-safe-area-context": "^4.5.2",
80
80
  "react-native-svg": ">=12.0.0"
81
81
  },
82
- "gitHead": "7347ac364b98158eacf3e455e02ad3475aae83a9"
82
+ "gitHead": "621a745c5403d89930eca6ab091bc64ad8c8f5e4"
83
83
  }
@@ -9,8 +9,8 @@ const ReanimatedView = Reanimated.View;
9
9
  const ReanimatedScrollView = Reanimated.ScrollView;
10
10
  export function Disclosure({ content, header, open, onToggle, isEmpty, animationDuration = tokens["timing-slowest"], }) {
11
11
  return (React.createElement(View, { style: styles.container },
12
- React.createElement(DisclosureHeader, Object.assign({}, { header, onToggle, isEmpty, open, animationDuration })),
13
- React.createElement(DisclosureContent, Object.assign({}, { content, open, animationDuration }))));
12
+ React.createElement(DisclosureHeader, { header, onToggle, isEmpty, open, animationDuration }),
13
+ React.createElement(DisclosureContent, { content, open, animationDuration })));
14
14
  }
15
15
  function DisclosureHeader({ header, onToggle, isEmpty, open, animationDuration, }) {
16
16
  const rotateZ = useSharedValue(0);
@@ -25,8 +25,6 @@ export function FormCache({ localCacheExclude, localCacheKey, setLocalCache, })
25
25
  setLocalCache(omit(formData, localCacheExclude));
26
26
  }
27
27
  else {
28
- // @ts-expect-error Typescript thinks that the FieldValues defined in useWatch is different
29
- // from the one in useFormContext
30
28
  setLocalCache(formData);
31
29
  }
32
30
  }, [formData, isDirty, localCacheExclude, setLocalCache, shouldExclude]);
@@ -59,7 +59,7 @@ export const FILE_MOCK_VIDEO = {
59
59
  fileName: "some_file.mp4",
60
60
  fileSize: 1,
61
61
  contentType: "video",
62
- url: undefined,
62
+ url: undefined, //undefined to prevent thumbnail errors
63
63
  thumbnailUrl: "path/to/fileThumbnail.mp4",
64
64
  };
65
65
  export const FILE_MOCK_FILE = {
@@ -10,11 +10,11 @@ export const HEADING_MAX_SCALED_FONT_SIZE = {
10
10
  export function Heading({ children, level, variation = "heading", reverseTheme = false, align, maxLines = "unlimited", allowFontScaling = true, selectable, }) {
11
11
  const headingStyle = getHeadingStyle(level, variation);
12
12
  const accessibilityRole = "header";
13
- return (React.createElement(Typography, Object.assign({}, Object.assign(Object.assign({}, headingStyle), { accessibilityRole,
13
+ return (React.createElement(Typography, Object.assign({}, headingStyle, { accessibilityRole,
14
14
  reverseTheme,
15
15
  align,
16
16
  maxLines,
17
- allowFontScaling }), { maxFontScaleSize: HEADING_MAX_SCALED_FONT_SIZE[level], selectable: selectable }), children));
17
+ allowFontScaling, maxFontScaleSize: HEADING_MAX_SCALED_FONT_SIZE[level], selectable: selectable }), children));
18
18
  }
19
19
  function getHeadingStyle(level = "heading", variation) {
20
20
  const headingLevelToStyle = {
@@ -18,7 +18,7 @@ export const TEXT_MAX_SCALED_FONT_SIZES = {
18
18
  };
19
19
  export function Text({ level = "text", variation = "base", emphasis, allowFontScaling = true, adjustsFontSizeToFit = false, maxLines = "unlimited", align, children, reverseTheme = false, strikeThrough = false, italic = false, hideFromScreenReader = false, maxFontScaleSize, underline, selectable, }) {
20
20
  const accessibilityRole = "text";
21
- return (React.createElement(Typography, Object.assign({ color: variation, fontFamily: "base", fontStyle: italic ? "italic" : "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable, underline: underline }, Object.assign(Object.assign({}, levelStyles[level]), { allowFontScaling,
21
+ return (React.createElement(Typography, Object.assign({ color: variation, fontFamily: "base", fontStyle: italic ? "italic" : "regular", fontWeight: getFontWeight({ level, emphasis }), maxFontScaleSize: maxFontScaleSize || TEXT_MAX_SCALED_FONT_SIZES[level], selectable: selectable, underline: underline }, levelStyles[level], { allowFontScaling,
22
22
  align,
23
23
  adjustsFontSizeToFit,
24
24
  accessibilityRole,
@@ -26,7 +26,7 @@ export function Text({ level = "text", variation = "base", emphasis, allowFontSc
26
26
  maxLines,
27
27
  strikeThrough,
28
28
  italic,
29
- hideFromScreenReader })), children));
29
+ hideFromScreenReader }), children));
30
30
  }
31
31
  function getFontWeight({ level, emphasis, }) {
32
32
  if (emphasis === "strong")
@@ -43,12 +43,10 @@ function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, colo
43
43
  }
44
44
  : { accessibilityRole };
45
45
  return (React.createElement(TypographyGestureDetector, null,
46
- React.createElement(Text, Object.assign({}, {
47
- allowFontScaling,
46
+ React.createElement(Text, Object.assign({ allowFontScaling,
48
47
  adjustsFontSizeToFit,
49
48
  style,
50
- numberOfLines: numberOfLinesForNativeText,
51
- }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"] }), text)));
49
+ numberOfLines: numberOfLinesForNativeText }, accessibilityProps, { maxFontSizeMultiplier: getScaleMultiplier(maxFontScaleSize, sizeAndHeight.fontSize), selectable: selectable, selectionColor: tokens["color-brand--highlight"] }), text)));
52
50
  }
53
51
  function getScaleMultiplier(maxFontScaleSize = 0, size = 1) {
54
52
  if (maxFontScaleSize === 0)
@@ -17,8 +17,8 @@ import { act } from "react-test-renderer";
17
17
  * to get the mock result of the query
18
18
  * @param milliseconds time to wait in milliseconds
19
19
  */
20
- export function wait(milliseconds = 0) {
21
- return __awaiter(this, void 0, void 0, function* () {
20
+ export function wait() {
21
+ return __awaiter(this, arguments, void 0, function* (milliseconds = 0) {
22
22
  yield new Promise((resolve) => setTimeout(resolve, milliseconds));
23
23
  });
24
24
  }