@sincpro/mobile-ui 3.0.1 → 3.1.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/Actions/Actions.Button.d.ts +6 -6
- package/dist/Actions/Actions.Button.js +650 -180
- package/dist/Actions/Actions.Dock.d.ts +1 -1
- package/dist/Actions/Actions.Dock.js +297 -18
- package/dist/Actions/Actions.FAB.js +100 -12
- package/dist/Actions/Actions.FilterButton.d.ts +17 -0
- package/dist/Actions/Actions.FilterButton.js +263 -33
- package/dist/Actions/Actions.IconButton.d.ts +1 -0
- package/dist/Actions/Actions.IconButton.js +196 -33
- package/dist/Actions/index.js +13 -13
- package/dist/Dialog/Confirmation.context.js +82 -16
- package/dist/Dialog/Dialog.ActionSheet.js +200 -41
- package/dist/Dialog/Dialog.Confirmation.js +168 -31
- package/dist/Dialog/Dialog.EditValue.js +449 -61
- package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
- package/dist/Dialog/Dialog.Sheet.js +231 -15
- package/dist/Dialog/OverlayHost.d.ts +23 -0
- package/dist/Dialog/OverlayHost.js +196 -0
- package/dist/Dialog/SheetSurface.d.ts +24 -0
- package/dist/Dialog/SheetSurface.js +441 -0
- package/dist/Dialog/dialog-actions.d.ts +17 -0
- package/dist/Dialog/dialog-actions.js +59 -0
- package/dist/Dialog/index.d.ts +4 -1
- package/dist/Dialog/index.js +8 -7
- package/dist/Dialog/overlay.store.d.ts +24 -0
- package/dist/Dialog/overlay.store.js +59 -0
- package/dist/Dialog/requestConfirmation.js +20 -10
- package/dist/Display/Display.Accordion.js +185 -13
- package/dist/Display/Display.AmountSummary.js +206 -15
- package/dist/Display/Display.Avatar.js +93 -31
- package/dist/Display/Display.AvatarGroup.js +132 -17
- package/dist/Display/Display.Badge.d.ts +18 -2
- package/dist/Display/Display.Badge.js +117 -49
- package/dist/Display/Display.Card.js +163 -26
- package/dist/Display/Display.Carousel.js +459 -105
- package/dist/Display/Display.Chip.d.ts +4 -1
- package/dist/Display/Display.Chip.js +165 -31
- package/dist/Display/Display.CircleButton.d.ts +1 -0
- package/dist/Display/Display.CircleButton.js +86 -27
- package/dist/Display/Display.CopyableText.js +289 -66
- package/dist/Display/Display.CountRecords.js +60 -3
- package/dist/Display/Display.DataTable.js +123 -13
- package/dist/Display/Display.Date.js +243 -33
- package/dist/Display/Display.Divider.d.ts +10 -10
- package/dist/Display/Display.Divider.js +67 -20
- package/dist/Display/Display.ExpoImage.js +97 -8
- package/dist/Display/Display.GradientSurface.d.ts +9 -4
- package/dist/Display/Display.GradientSurface.js +196 -46
- package/dist/Display/Display.Icon.js +129 -15
- package/dist/Display/Display.IconBadge.js +95 -25
- package/dist/Display/Display.Image.d.ts +7 -1
- package/dist/Display/Display.Image.js +344 -39
- package/dist/Display/Display.KeyValue.js +90 -5
- package/dist/Display/Display.ListGroup.js +181 -9
- package/dist/Display/Display.ListItem.js +324 -28
- package/dist/Display/Display.Logo.js +84 -29
- package/dist/Display/Display.MediaCard.js +125 -4
- package/dist/Display/Display.MediaEmbed.d.ts +0 -5
- package/dist/Display/Display.MediaEmbed.js +170 -26
- package/dist/Display/Display.MenuButton.d.ts +2 -2
- package/dist/Display/Display.MenuButton.js +380 -94
- package/dist/Display/Display.MenuCard.js +122 -18
- package/dist/Display/Display.MenuGrid.js +43 -3
- package/dist/Display/Display.Monetary.js +90 -5
- package/dist/Display/Display.Pattern.js +306 -47
- package/dist/Display/Display.PriceTag.js +117 -14
- package/dist/Display/Display.ProductCard.js +154 -4
- package/dist/Display/Display.Rating.js +92 -11
- package/dist/Display/Display.SearchHistory.js +132 -6
- package/dist/Display/Display.SectionHeader.d.ts +5 -1
- package/dist/Display/Display.SectionHeader.js +125 -12
- package/dist/Display/Display.Stat.js +62 -3
- package/dist/Display/Display.StatCard.js +131 -7
- package/dist/Display/Display.StatusBadge.d.ts +29 -0
- package/dist/Display/Display.StatusBadge.js +68 -0
- package/dist/Display/Display.StatusDot.js +93 -18
- package/dist/Display/Display.Story.js +285 -35
- package/dist/Display/Display.StoryTray.js +354 -34
- package/dist/Display/Display.StoryViewer.js +571 -72
- package/dist/Display/Display.SwipeableRow.js +141 -20
- package/dist/Display/Display.Tag.d.ts +4 -1
- package/dist/Display/Display.Tag.js +66 -4
- package/dist/Display/Display.Timeline.js +102 -13
- package/dist/Display/Display.Tooltip.js +122 -26
- package/dist/Display/chevron.d.ts +6 -0
- package/dist/Display/chevron.js +32 -0
- package/dist/Display/count-badge.d.ts +21 -0
- package/dist/Display/count-badge.js +124 -0
- package/dist/Display/group-title.d.ts +10 -0
- package/dist/Display/group-title.js +53 -0
- package/dist/Display/icon-font.d.ts +3 -0
- package/dist/Display/icon-font.ios.d.ts +3 -0
- package/dist/Display/icon-font.ios.js +4 -0
- package/dist/Display/icon-font.js +7 -0
- package/dist/Display/icon-glyphs.d.ts +2 -0
- package/dist/Display/icon-glyphs.js +87 -0
- package/dist/Display/icon-map.d.ts +5 -1
- package/dist/Display/icon-map.js +340 -84
- package/dist/Display/icon-registry.d.ts +21 -0
- package/dist/Display/icon-registry.js +21 -0
- package/dist/Display/index.d.ts +6 -1
- package/dist/Display/index.js +53 -48
- package/dist/Display/pill.d.ts +16 -0
- package/dist/Display/pill.js +47 -0
- package/dist/Feedback/ErrorBoundary.js +35 -23
- package/dist/Feedback/Feedback.Banner.js +202 -24
- package/dist/Feedback/Feedback.DomainSplashScreen.js +246 -70
- package/dist/Feedback/Feedback.Empty.js +54 -3
- package/dist/Feedback/Feedback.EmptyState.js +114 -5
- package/dist/Feedback/Feedback.Error.d.ts +1 -1
- package/dist/Feedback/Feedback.Error.js +130 -5
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +70 -3
- package/dist/Feedback/Feedback.PermissionCard.js +161 -5
- package/dist/Feedback/Feedback.Progress.js +199 -41
- package/dist/Feedback/Feedback.ProgressCircle.js +184 -12
- package/dist/Feedback/Feedback.Skeleton.js +149 -36
- package/dist/Feedback/Feedback.Spinner.js +407 -79
- package/dist/Feedback/Feedback.Splash.js +240 -33
- package/dist/Feedback/Feedback.State.d.ts +17 -0
- package/dist/Feedback/Feedback.State.js +104 -0
- package/dist/Feedback/Toast.context.js +883 -167
- package/dist/Feedback/index.d.ts +3 -0
- package/dist/Feedback/index.js +15 -13
- package/dist/Form/Form.Checkbox.js +212 -22
- package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
- package/dist/Form/Form.ControlledCheckbox.js +46 -4
- package/dist/Form/Form.ControlledDropdown.d.ts +1 -1
- package/dist/Form/Form.ControlledDropdown.js +62 -4
- package/dist/Form/Form.ControlledInput.d.ts +4 -3
- package/dist/Form/Form.ControlledInput.js +72 -4
- package/dist/Form/Form.ControlledMonetaryInput.d.ts +6 -3
- package/dist/Form/Form.ControlledMonetaryInput.js +50 -4
- package/dist/Form/Form.ControlledRadioButton.d.ts +2 -2
- package/dist/Form/Form.ControlledRadioButton.js +45 -4
- package/dist/Form/Form.DatePicker.js +505 -107
- package/dist/Form/Form.Dropdown.js +303 -52
- package/dist/Form/Form.ErrorSummary.js +236 -44
- package/dist/Form/Form.Field.d.ts +24 -0
- package/dist/Form/Form.Field.js +55 -0
- package/dist/Form/Form.FractionalQuantityInput.js +508 -96
- package/dist/Form/Form.Input.d.ts +17 -3
- package/dist/Form/Form.Input.js +478 -29
- package/dist/Form/Form.KeyboardForm.d.ts +22 -8
- package/dist/Form/Form.KeyboardForm.js +83 -8
- package/dist/Form/Form.KeyboardToolbarHost.d.ts +14 -0
- package/dist/Form/Form.KeyboardToolbarHost.js +182 -0
- package/dist/Form/Form.MonetaryInput.js +164 -17
- package/dist/Form/Form.PickerField.d.ts +31 -0
- package/dist/Form/Form.PickerField.js +562 -0
- package/dist/Form/Form.PinInput.js +150 -15
- package/dist/Form/Form.QuantitySelector.js +229 -25
- package/dist/Form/Form.RadioButton.js +132 -24
- package/dist/Form/Form.Select.js +487 -56
- package/dist/Form/Form.Slider.js +133 -10
- package/dist/Form/Form.Switch.js +99 -4
- package/dist/Form/index.d.ts +11 -6
- package/dist/Form/index.js +26 -27
- package/dist/Form/input-text.d.ts +7 -0
- package/dist/Form/input-text.js +18 -0
- package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
- package/dist/Navigation/Navigation.AppBar.js +535 -99
- package/dist/Navigation/Navigation.BottomNav.js +363 -98
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
- package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
- package/dist/Navigation/Navigation.FloatingBar.js +71 -11
- package/dist/Navigation/Navigation.Menu.js +309 -95
- package/dist/Navigation/Navigation.MenuSection.js +80 -11
- package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
- package/dist/Navigation/Navigation.RowItem.js +93 -8
- package/dist/Navigation/Navigation.Search.js +241 -27
- package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
- package/dist/Navigation/Navigation.SearchBar.js +218 -29
- package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
- package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
- package/dist/Navigation/Navigation.Steps.js +105 -11
- package/dist/Navigation/Navigation.Tabs.js +449 -41
- package/dist/Navigation/index.d.ts +9 -4
- package/dist/Navigation/index.js +13 -13
- package/dist/Typography/Typography.Heading.js +33 -3
- package/dist/Typography/Typography.SelectableText.js +95 -7
- package/dist/Typography/Typography.Text.d.ts +4 -2
- package/dist/Typography/Typography.Text.js +217 -7
- package/dist/Typography/index.js +3 -3
- package/dist/branding.js +29 -13
- package/dist/icons/AddItemIcon.js +76 -2
- package/dist/icons/ArrangeCircle.js +82 -2
- package/dist/icons/ArrowDownIcon.js +63 -3
- package/dist/icons/ArrowUpIcon.js +63 -3
- package/dist/icons/BoxIcon.js +64 -2
- package/dist/icons/BoxTimeIcon.js +63 -2
- package/dist/icons/CalendarIcon.js +145 -2
- package/dist/icons/CardIcon.js +80 -2
- package/dist/icons/CashierIcon.js +39 -2
- package/dist/icons/CreditIcon.js +76 -3
- package/dist/icons/DuoIcon.js +75 -2
- package/dist/icons/HomeIcon.js +39 -2
- package/dist/icons/HomeIconOutlined.js +53 -2
- package/dist/icons/LogoIcon.js +87 -2
- package/dist/icons/MoneyReceiveIcon.js +86 -2
- package/dist/icons/PinIcon.js +39 -2
- package/dist/icons/ProfileIcon.js +47 -2
- package/dist/icons/SettingsIcon.js +114 -2
- package/dist/icons/SinpeIcon.js +60 -2
- package/dist/icons/ToggleOffIcon.js +53 -2
- package/dist/icons/WalletMoneyIcon.js +81 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/layouts/AuthContainer.d.ts +4 -5
- package/dist/layouts/AuthContainer.js +231 -7
- package/dist/layouts/BottomInset.js +4 -1
- package/dist/layouts/Container.d.ts +2 -2
- package/dist/layouts/Container.js +45 -3
- package/dist/layouts/GradientContainer.js +37 -5
- package/dist/layouts/PlainLayout.js +19 -3
- package/dist/layouts/ScrollContainer.d.ts +14 -9
- package/dist/layouts/ScrollContainer.js +125 -4
- package/dist/layouts/edges.d.ts +2 -0
- package/dist/layouts/edges.js +1 -0
- package/dist/primitives/AspectRatio.js +75 -3
- package/dist/primitives/Box.js +45 -3
- package/dist/primitives/Pressable.js +95 -5
- package/dist/primitives/Row.js +84 -13
- package/dist/primitives/Spacer.js +42 -5
- package/dist/primitives/Stack.js +66 -7
- package/dist/primitives/index.js +1 -1
- package/dist/theme/active.js +20 -18
- package/dist/theme/build.js +118 -87
- package/dist/theme/color.js +87 -87
- package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
- package/dist/theme/components/ThemedActivityIndicator.js +35 -3
- package/dist/theme/components/index.js +1 -0
- package/dist/theme/contrast.js +32 -33
- package/dist/theme/css-vars.js +71 -75
- package/dist/theme/dark.js +116 -97
- package/dist/theme/default.js +116 -97
- package/dist/theme/define.js +16 -12
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +7 -6
- package/dist/theme/on-dark-surface.d.ts +12 -0
- package/dist/theme/on-dark-surface.js +13 -0
- package/dist/theme/theme.js +1 -0
- package/dist/theme/tw.js +3 -1
- package/dist/theme/types.js +0 -18
- package/dist/theme/typography.d.ts +1 -1
- package/dist/theme/typography.js +337 -303
- package/dist/theme/useTheme.js +12 -3
- package/dist/theme/useThemeVars.d.ts +9 -0
- package/dist/theme/useThemeVars.js +23 -0
- package/dist/theme/validate.js +175 -166
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/motion.js +30 -13
- package/dist/utils/async.d.ts +14 -0
- package/dist/utils/async.js +22 -0
- package/dist/utils/criteria.js +66 -85
- package/dist/utils/date.d.ts +8 -2
- package/dist/utils/date.js +63 -50
- package/dist/utils/image.js +8 -8
- package/dist/utils/intl.d.ts +1 -0
- package/dist/utils/intl.js +13 -0
- package/dist/utils/keys.js +3 -5
- package/dist/utils/monetary.d.ts +1 -0
- package/dist/utils/monetary.js +28 -24
- package/dist/utils/progress.js +2 -3
- package/dist/utils/quantity.js +25 -26
- package/dist/utils/reorder.js +11 -20
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +12 -0
- package/dist/utils/serializer.js +38 -38
- package/dist/utils/useReducedMotion.js +32 -30
- package/dist/views/AppSplashView.js +117 -3
- package/dist/views/AuthFormView.d.ts +4 -5
- package/dist/views/AuthFormView.js +119 -11
- package/dist/views/FormViewV2.context.js +75 -23
- package/dist/views/FormViewV2.d.ts +4 -5
- package/dist/views/FormViewV2.js +658 -92
- package/dist/views/ListViewV2.context.js +91 -47
- package/dist/views/ListViewV2.d.ts +84 -43
- package/dist/views/ListViewV2.js +1350 -200
- package/dist/views/Wizard/Wizard.context.js +248 -84
- package/dist/views/Wizard/Wizard.js +260 -67
- package/dist/views/types/IListView.js +34 -31
- package/dist/widgets/CollectionOptions.js +557 -138
- package/dist/widgets/FilterBar.js +159 -7
- package/dist/widgets/FilterBuilder.js +375 -102
- package/dist/widgets/JSONViewer.js +275 -129
- package/dist/widgets/PromoBanner.js +336 -42
- package/dist/widgets/PromoModal.d.ts +2 -2
- package/dist/widgets/PromoModal.js +389 -62
- package/dist/widgets/QueryChoice.js +150 -8
- package/dist/widgets/QuickActions.js +120 -31
- package/dist/widgets/ReorderableList.js +399 -128
- package/dist/widgets/TimeZoneSelectorModal.js +458 -51
- package/dist/widgets/index.js +3 -3
- package/package.json +6 -1
- package/tailwind.preset.js +7 -5
- package/dist/Form/Form.InputField.d.ts +0 -10
- package/dist/Form/Form.InputField.js +0 -38
- package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
- package/dist/Form/Form.KeyboardToolbar.js +0 -66
- package/dist/Form/Form.PasswordInput.d.ts +0 -9
- package/dist/Form/Form.PasswordInput.js +0 -17
- package/dist/Form/Form.TextInput.d.ts +0 -8
- package/dist/Form/Form.TextInput.js +0 -8
- package/dist/primitives/BaseButton.d.ts +0 -150
- package/dist/primitives/BaseButton.js +0 -229
- package/dist/utils/useSheetTranslation.d.ts +0 -5
- package/dist/utils/useSheetTranslation.js +0 -23
package/dist/views/FormViewV2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Display } from "../Display/index.js";
|
|
3
3
|
import { ErrorBoundary, Feedback } from "../Feedback/index.js";
|
|
4
4
|
import KeyboardForm from "../Form/Form.KeyboardForm.js";
|
|
@@ -6,89 +6,458 @@ import { useBottomInset } from "../layouts/BottomInset.js";
|
|
|
6
6
|
import Container from "../layouts/Container.js";
|
|
7
7
|
import { AppBar } from "../Navigation/Navigation.AppBar.js";
|
|
8
8
|
import { MenuSection } from "../Navigation/Navigation.MenuSection.js";
|
|
9
|
-
import { SegmentedControl
|
|
9
|
+
import { SegmentedControl } from "../Navigation/Navigation.SegmentedControl.js";
|
|
10
10
|
import { useTheme } from "../theme/index.js";
|
|
11
11
|
import { FormViewProvider, useFormView } from "./FormViewV2.context.js";
|
|
12
12
|
import React from "react";
|
|
13
13
|
import { RefreshControl, useWindowDimensions, View } from "react-native";
|
|
14
14
|
import { KeyboardStickyView } from "react-native-keyboard-controller";
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
15
16
|
const RefreshErrorContext = React.createContext(undefined);
|
|
16
17
|
const FooterHeightContext = React.createContext(null);
|
|
17
18
|
function useFooterHeight() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const context = React.useContext(FooterHeightContext);
|
|
20
|
+
if (!context) {
|
|
21
|
+
throw new Error("FormViewV2.Content and Footer must be used within FormViewV2.Root");
|
|
22
|
+
}
|
|
23
|
+
return context;
|
|
23
24
|
}
|
|
24
25
|
export async function refreshFormData(onRefresh, onRefreshError, setShowRefreshing) {
|
|
25
|
-
|
|
26
|
+
setShowRefreshing(true);
|
|
27
|
+
try {
|
|
28
|
+
await onRefresh?.();
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error("[FormViewV2] Refresh failed", error);
|
|
26
31
|
try {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console.error("[FormViewV2] Refresh failed", error);
|
|
31
|
-
try {
|
|
32
|
-
onRefreshError?.(error);
|
|
33
|
-
}
|
|
34
|
-
catch (callbackError) {
|
|
35
|
-
console.error("[FormViewV2] onRefreshError callback failed", callbackError);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
finally {
|
|
39
|
-
setShowRefreshing(false);
|
|
32
|
+
onRefreshError?.(error);
|
|
33
|
+
} catch (callbackError) {
|
|
34
|
+
console.error("[FormViewV2] onRefreshError callback failed", callbackError);
|
|
40
35
|
}
|
|
36
|
+
} finally {
|
|
37
|
+
setShowRefreshing(false);
|
|
38
|
+
}
|
|
41
39
|
}
|
|
42
|
-
function FormViewRoot(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
function FormViewRoot(t0) {
|
|
41
|
+
const $ = _c(30);
|
|
42
|
+
const {
|
|
43
|
+
name,
|
|
44
|
+
description,
|
|
45
|
+
item,
|
|
46
|
+
isLoading: t1,
|
|
47
|
+
isEmpty: t2,
|
|
48
|
+
hasError: t3,
|
|
49
|
+
errorMessage,
|
|
50
|
+
readonly: t4,
|
|
51
|
+
onRefresh,
|
|
52
|
+
onRefreshError,
|
|
53
|
+
onRetry,
|
|
54
|
+
onBack,
|
|
55
|
+
withContainer: t5,
|
|
56
|
+
edges: t6,
|
|
57
|
+
children
|
|
58
|
+
} = t0;
|
|
59
|
+
const isLoading = t1 === undefined ? false : t1;
|
|
60
|
+
const isEmpty = t2 === undefined ? false : t2;
|
|
61
|
+
const hasError = t3 === undefined ? false : t3;
|
|
62
|
+
const readonly = t4 === undefined ? false : t4;
|
|
63
|
+
const withContainer = t5 === undefined ? true : t5;
|
|
64
|
+
let t7;
|
|
65
|
+
if ($[0] !== t6) {
|
|
66
|
+
t7 = t6 === undefined ? ["left", "right"] : t6;
|
|
67
|
+
$[0] = t6;
|
|
68
|
+
$[1] = t7;
|
|
69
|
+
} else {
|
|
70
|
+
t7 = $[1];
|
|
71
|
+
}
|
|
72
|
+
const edges = t7;
|
|
73
|
+
const [footerHeight, setFooterHeight] = React.useState(0);
|
|
74
|
+
let t8;
|
|
75
|
+
if ($[2] !== footerHeight) {
|
|
76
|
+
t8 = {
|
|
77
|
+
height: footerHeight,
|
|
78
|
+
setHeight: setFooterHeight
|
|
79
|
+
};
|
|
80
|
+
$[2] = footerHeight;
|
|
81
|
+
$[3] = t8;
|
|
82
|
+
} else {
|
|
83
|
+
t8 = $[3];
|
|
84
|
+
}
|
|
85
|
+
const footerContext = t8;
|
|
86
|
+
const Wrapper = withContainer ? Container : View;
|
|
87
|
+
let t9;
|
|
88
|
+
if ($[4] !== edges || $[5] !== withContainer) {
|
|
89
|
+
t9 = withContainer ? {
|
|
90
|
+
edges
|
|
91
|
+
} : {
|
|
92
|
+
style: {
|
|
93
|
+
flex: 1
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
$[4] = edges;
|
|
97
|
+
$[5] = withContainer;
|
|
98
|
+
$[6] = t9;
|
|
99
|
+
} else {
|
|
100
|
+
t9 = $[6];
|
|
101
|
+
}
|
|
102
|
+
const wrapperProps = t9;
|
|
103
|
+
let t10;
|
|
104
|
+
if ($[7] !== Wrapper || $[8] !== children || $[9] !== wrapperProps) {
|
|
105
|
+
t10 = _jsx(Wrapper, {
|
|
106
|
+
...wrapperProps,
|
|
107
|
+
children: children
|
|
108
|
+
});
|
|
109
|
+
$[7] = Wrapper;
|
|
110
|
+
$[8] = children;
|
|
111
|
+
$[9] = wrapperProps;
|
|
112
|
+
$[10] = t10;
|
|
113
|
+
} else {
|
|
114
|
+
t10 = $[10];
|
|
115
|
+
}
|
|
116
|
+
let t11;
|
|
117
|
+
if ($[11] !== footerContext || $[12] !== t10) {
|
|
118
|
+
t11 = _jsx(ErrorBoundary, {
|
|
119
|
+
children: _jsx(FooterHeightContext.Provider, {
|
|
120
|
+
value: footerContext,
|
|
121
|
+
children: t10
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
$[11] = footerContext;
|
|
125
|
+
$[12] = t10;
|
|
126
|
+
$[13] = t11;
|
|
127
|
+
} else {
|
|
128
|
+
t11 = $[13];
|
|
129
|
+
}
|
|
130
|
+
let t12;
|
|
131
|
+
if ($[14] !== onRefreshError || $[15] !== t11) {
|
|
132
|
+
t12 = _jsx(RefreshErrorContext.Provider, {
|
|
133
|
+
value: onRefreshError,
|
|
134
|
+
children: t11
|
|
135
|
+
});
|
|
136
|
+
$[14] = onRefreshError;
|
|
137
|
+
$[15] = t11;
|
|
138
|
+
$[16] = t12;
|
|
139
|
+
} else {
|
|
140
|
+
t12 = $[16];
|
|
141
|
+
}
|
|
142
|
+
let t13;
|
|
143
|
+
if ($[17] !== description || $[18] !== errorMessage || $[19] !== hasError || $[20] !== isEmpty || $[21] !== isLoading || $[22] !== item || $[23] !== name || $[24] !== onBack || $[25] !== onRefresh || $[26] !== onRetry || $[27] !== readonly || $[28] !== t12) {
|
|
144
|
+
t13 = _jsx(FormViewProvider, {
|
|
145
|
+
description: description,
|
|
146
|
+
errorMessage: errorMessage,
|
|
147
|
+
hasError: hasError,
|
|
148
|
+
isEmpty: isEmpty,
|
|
149
|
+
isLoading: isLoading,
|
|
150
|
+
item: item,
|
|
151
|
+
name: name,
|
|
152
|
+
onBack: onBack,
|
|
153
|
+
onRefresh: onRefresh,
|
|
154
|
+
onRetry: onRetry,
|
|
155
|
+
readonly: readonly,
|
|
156
|
+
children: t12
|
|
157
|
+
});
|
|
158
|
+
$[17] = description;
|
|
159
|
+
$[18] = errorMessage;
|
|
160
|
+
$[19] = hasError;
|
|
161
|
+
$[20] = isEmpty;
|
|
162
|
+
$[21] = isLoading;
|
|
163
|
+
$[22] = item;
|
|
164
|
+
$[23] = name;
|
|
165
|
+
$[24] = onBack;
|
|
166
|
+
$[25] = onRefresh;
|
|
167
|
+
$[26] = onRetry;
|
|
168
|
+
$[27] = readonly;
|
|
169
|
+
$[28] = t12;
|
|
170
|
+
$[29] = t13;
|
|
171
|
+
} else {
|
|
172
|
+
t13 = $[29];
|
|
173
|
+
}
|
|
174
|
+
return t13;
|
|
48
175
|
}
|
|
49
|
-
function Header(
|
|
50
|
-
|
|
51
|
-
|
|
176
|
+
function Header(t0) {
|
|
177
|
+
const $ = _c(11);
|
|
178
|
+
const {
|
|
179
|
+
safeArea: t1,
|
|
180
|
+
variant: t2,
|
|
181
|
+
tone,
|
|
182
|
+
actions,
|
|
183
|
+
children,
|
|
184
|
+
topSpacing,
|
|
185
|
+
background
|
|
186
|
+
} = t0;
|
|
187
|
+
const safeArea = t1 === undefined ? true : t1;
|
|
188
|
+
const variant = t2 === undefined ? "default" : t2;
|
|
189
|
+
const {
|
|
190
|
+
name,
|
|
191
|
+
description,
|
|
192
|
+
onBack
|
|
193
|
+
} = useFormView();
|
|
194
|
+
const t3 = description ?? undefined;
|
|
195
|
+
let t4;
|
|
196
|
+
if ($[0] !== actions || $[1] !== background || $[2] !== children || $[3] !== name || $[4] !== onBack || $[5] !== safeArea || $[6] !== t3 || $[7] !== tone || $[8] !== topSpacing || $[9] !== variant) {
|
|
197
|
+
t4 = _jsx(AppBar, {
|
|
198
|
+
actions: actions,
|
|
199
|
+
background: background,
|
|
200
|
+
onBack: onBack,
|
|
201
|
+
safeArea: safeArea,
|
|
202
|
+
subheader: children,
|
|
203
|
+
subtitle: t3,
|
|
204
|
+
title: name,
|
|
205
|
+
tone: tone,
|
|
206
|
+
topSpacing: topSpacing,
|
|
207
|
+
variant: variant
|
|
208
|
+
});
|
|
209
|
+
$[0] = actions;
|
|
210
|
+
$[1] = background;
|
|
211
|
+
$[2] = children;
|
|
212
|
+
$[3] = name;
|
|
213
|
+
$[4] = onBack;
|
|
214
|
+
$[5] = safeArea;
|
|
215
|
+
$[6] = t3;
|
|
216
|
+
$[7] = tone;
|
|
217
|
+
$[8] = topSpacing;
|
|
218
|
+
$[9] = variant;
|
|
219
|
+
$[10] = t4;
|
|
220
|
+
} else {
|
|
221
|
+
t4 = $[10];
|
|
222
|
+
}
|
|
223
|
+
return t4;
|
|
52
224
|
}
|
|
53
|
-
function HeaderActions(
|
|
54
|
-
|
|
225
|
+
function HeaderActions(t0) {
|
|
226
|
+
const $ = _c(2);
|
|
227
|
+
const {
|
|
228
|
+
children
|
|
229
|
+
} = t0;
|
|
230
|
+
let t1;
|
|
231
|
+
if ($[0] !== children) {
|
|
232
|
+
t1 = _jsx(View, {
|
|
233
|
+
className: "flex-row px-4 my-2 items-center justify-between flex-1 gap-2",
|
|
234
|
+
children: children
|
|
235
|
+
});
|
|
236
|
+
$[0] = children;
|
|
237
|
+
$[1] = t1;
|
|
238
|
+
} else {
|
|
239
|
+
t1 = $[1];
|
|
240
|
+
}
|
|
241
|
+
return t1;
|
|
55
242
|
}
|
|
243
|
+
|
|
56
244
|
/** Secondary action bar docked below the AppBar — use for Save/Cancel, filter chips, etc. */
|
|
57
|
-
function HeaderActionsBar(
|
|
58
|
-
|
|
245
|
+
function HeaderActionsBar(t0) {
|
|
246
|
+
const $ = _c(2);
|
|
247
|
+
const {
|
|
248
|
+
children
|
|
249
|
+
} = t0;
|
|
250
|
+
let t1;
|
|
251
|
+
if ($[0] !== children) {
|
|
252
|
+
t1 = _jsx(View, {
|
|
253
|
+
className: "bg-bg-card px-4 pt-1 pb-3 border-b border-border-light flex-row gap-2 items-center",
|
|
254
|
+
children: children
|
|
255
|
+
});
|
|
256
|
+
$[0] = children;
|
|
257
|
+
$[1] = t1;
|
|
258
|
+
} else {
|
|
259
|
+
t1 = $[1];
|
|
260
|
+
}
|
|
261
|
+
return t1;
|
|
59
262
|
}
|
|
263
|
+
|
|
60
264
|
/**
|
|
61
265
|
* Tab-like segmented switch for the header subheader (e.g. "Detalles" / "Historial").
|
|
62
266
|
* Use as a child of `<FormViewV2.Header>` — it lands in the AppBar subheader slot.
|
|
63
267
|
*/
|
|
64
268
|
function HeaderSegmented(props) {
|
|
65
|
-
|
|
269
|
+
const $ = _c(2);
|
|
270
|
+
let t0;
|
|
271
|
+
if ($[0] !== props) {
|
|
272
|
+
t0 = _jsx(SegmentedControl, {
|
|
273
|
+
...props
|
|
274
|
+
});
|
|
275
|
+
$[0] = props;
|
|
276
|
+
$[1] = t0;
|
|
277
|
+
} else {
|
|
278
|
+
t0 = $[1];
|
|
279
|
+
}
|
|
280
|
+
return t0;
|
|
66
281
|
}
|
|
67
|
-
function Content(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
282
|
+
function Content(t0) {
|
|
283
|
+
const $ = _c(39);
|
|
284
|
+
const {
|
|
285
|
+
withMargin: t1,
|
|
286
|
+
keyboardFormProps,
|
|
287
|
+
children
|
|
288
|
+
} = t0;
|
|
289
|
+
const withMargin = t1 === undefined ? false : t1;
|
|
290
|
+
const {
|
|
291
|
+
name,
|
|
292
|
+
isLoading,
|
|
293
|
+
isEmpty,
|
|
294
|
+
hasError,
|
|
295
|
+
errorMessage,
|
|
296
|
+
item,
|
|
297
|
+
onRefresh,
|
|
298
|
+
onRetry,
|
|
299
|
+
onBack,
|
|
300
|
+
showRefreshing,
|
|
301
|
+
setShowRefreshing
|
|
302
|
+
} = useFormView();
|
|
303
|
+
const bottomInset = useBottomInset();
|
|
304
|
+
const {
|
|
305
|
+
height: measuredFooterHeight
|
|
306
|
+
} = useFooterHeight();
|
|
307
|
+
const stickyFooterHeight = isLoading || isEmpty ? 0 : measuredFooterHeight;
|
|
308
|
+
const theme = useTheme();
|
|
309
|
+
const onRefreshError = React.useContext(RefreshErrorContext);
|
|
310
|
+
let t2;
|
|
311
|
+
if ($[0] !== onRefresh || $[1] !== onRefreshError || $[2] !== setShowRefreshing) {
|
|
312
|
+
t2 = async () => {
|
|
313
|
+
await refreshFormData(onRefresh, onRefreshError, setShowRefreshing);
|
|
314
|
+
};
|
|
315
|
+
$[0] = onRefresh;
|
|
316
|
+
$[1] = onRefreshError;
|
|
317
|
+
$[2] = setShowRefreshing;
|
|
318
|
+
$[3] = t2;
|
|
319
|
+
} else {
|
|
320
|
+
t2 = $[3];
|
|
321
|
+
}
|
|
322
|
+
const handleRefresh = t2;
|
|
323
|
+
const isCenteredContent = isLoading || isEmpty || !item || hasError;
|
|
324
|
+
const t3 = isCenteredContent ? "center" : "flex-start";
|
|
325
|
+
const t4 = isCenteredContent ? "center" : "stretch";
|
|
326
|
+
let t5;
|
|
327
|
+
if ($[4] !== bottomInset || $[5] !== t3 || $[6] !== t4) {
|
|
328
|
+
t5 = {
|
|
329
|
+
flexGrow: 1,
|
|
330
|
+
justifyContent: t3,
|
|
331
|
+
alignItems: t4,
|
|
332
|
+
paddingBottom: bottomInset
|
|
333
|
+
};
|
|
334
|
+
$[4] = bottomInset;
|
|
335
|
+
$[5] = t3;
|
|
336
|
+
$[6] = t4;
|
|
337
|
+
$[7] = t5;
|
|
338
|
+
} else {
|
|
339
|
+
t5 = $[7];
|
|
340
|
+
}
|
|
341
|
+
const t6 = keyboardFormProps?.contentContainerStyle;
|
|
342
|
+
let t7;
|
|
343
|
+
if ($[8] !== t5 || $[9] !== t6) {
|
|
344
|
+
t7 = [t5, t6];
|
|
345
|
+
$[8] = t5;
|
|
346
|
+
$[9] = t6;
|
|
347
|
+
$[10] = t7;
|
|
348
|
+
} else {
|
|
349
|
+
t7 = $[10];
|
|
350
|
+
}
|
|
351
|
+
const t8 = keyboardFormProps?.keyboardShouldPersistTaps ?? "handled";
|
|
352
|
+
let t9;
|
|
353
|
+
if ($[11] !== handleRefresh || $[12] !== keyboardFormProps?.refreshControl || $[13] !== showRefreshing || $[14] !== theme.primary) {
|
|
354
|
+
t9 = keyboardFormProps?.refreshControl ?? _jsx(RefreshControl, {
|
|
355
|
+
colors: [theme.primary],
|
|
356
|
+
onRefresh: handleRefresh,
|
|
357
|
+
refreshing: showRefreshing
|
|
358
|
+
});
|
|
359
|
+
$[11] = handleRefresh;
|
|
360
|
+
$[12] = keyboardFormProps?.refreshControl;
|
|
361
|
+
$[13] = showRefreshing;
|
|
362
|
+
$[14] = theme.primary;
|
|
363
|
+
$[15] = t9;
|
|
364
|
+
} else {
|
|
365
|
+
t9 = $[15];
|
|
366
|
+
}
|
|
367
|
+
let t10;
|
|
368
|
+
if ($[16] !== theme.bg.page) {
|
|
369
|
+
t10 = {
|
|
370
|
+
flex: 1,
|
|
371
|
+
backgroundColor: theme.bg.page
|
|
372
|
+
};
|
|
373
|
+
$[16] = theme.bg.page;
|
|
374
|
+
$[17] = t10;
|
|
375
|
+
} else {
|
|
376
|
+
t10 = $[17];
|
|
377
|
+
}
|
|
378
|
+
const t11 = keyboardFormProps?.style;
|
|
379
|
+
let t12;
|
|
380
|
+
if ($[18] !== t10 || $[19] !== t11) {
|
|
381
|
+
t12 = [t10, t11];
|
|
382
|
+
$[18] = t10;
|
|
383
|
+
$[19] = t11;
|
|
384
|
+
$[20] = t12;
|
|
385
|
+
} else {
|
|
386
|
+
t12 = $[20];
|
|
387
|
+
}
|
|
388
|
+
let t13;
|
|
389
|
+
if ($[21] !== children || $[22] !== errorMessage || $[23] !== hasError || $[24] !== isCenteredContent || $[25] !== isLoading || $[26] !== name || $[27] !== onBack || $[28] !== onRetry || $[29] !== withMargin) {
|
|
390
|
+
t13 = isCenteredContent ? _jsx(_Fragment, {
|
|
391
|
+
children: isLoading ? _jsx(Feedback.Loading, {
|
|
392
|
+
message: `Cargando ${name}...`
|
|
393
|
+
}) : hasError ? _jsx(Feedback.Error, {
|
|
394
|
+
message: errorMessage,
|
|
395
|
+
onBack: onBack,
|
|
396
|
+
onRetry: onRetry
|
|
397
|
+
}) : _jsx(Feedback.Empty, {})
|
|
398
|
+
}) : _jsx(View, {
|
|
399
|
+
style: withMargin ? {
|
|
400
|
+
paddingHorizontal: 16
|
|
401
|
+
} : undefined,
|
|
402
|
+
children: children
|
|
403
|
+
});
|
|
404
|
+
$[21] = children;
|
|
405
|
+
$[22] = errorMessage;
|
|
406
|
+
$[23] = hasError;
|
|
407
|
+
$[24] = isCenteredContent;
|
|
408
|
+
$[25] = isLoading;
|
|
409
|
+
$[26] = name;
|
|
410
|
+
$[27] = onBack;
|
|
411
|
+
$[28] = onRetry;
|
|
412
|
+
$[29] = withMargin;
|
|
413
|
+
$[30] = t13;
|
|
414
|
+
} else {
|
|
415
|
+
t13 = $[30];
|
|
416
|
+
}
|
|
417
|
+
let t14;
|
|
418
|
+
if ($[31] !== keyboardFormProps || $[32] !== stickyFooterHeight || $[33] !== t12 || $[34] !== t13 || $[35] !== t7 || $[36] !== t8 || $[37] !== t9) {
|
|
419
|
+
t14 = _jsx(KeyboardForm, {
|
|
420
|
+
...keyboardFormProps,
|
|
421
|
+
contentContainerStyle: t7,
|
|
422
|
+
keyboardShouldPersistTaps: t8,
|
|
423
|
+
refreshControl: t9,
|
|
424
|
+
stickyFooterHeight: stickyFooterHeight,
|
|
425
|
+
style: t12,
|
|
426
|
+
children: t13
|
|
427
|
+
});
|
|
428
|
+
$[31] = keyboardFormProps;
|
|
429
|
+
$[32] = stickyFooterHeight;
|
|
430
|
+
$[33] = t12;
|
|
431
|
+
$[34] = t13;
|
|
432
|
+
$[35] = t7;
|
|
433
|
+
$[36] = t8;
|
|
434
|
+
$[37] = t9;
|
|
435
|
+
$[38] = t14;
|
|
436
|
+
} else {
|
|
437
|
+
t14 = $[38];
|
|
438
|
+
}
|
|
439
|
+
return t14;
|
|
87
440
|
}
|
|
441
|
+
|
|
88
442
|
/** Layout wrapper for a set of Group cards. Content already handles isEmpty/loading states. */
|
|
89
|
-
function Groups(
|
|
90
|
-
|
|
443
|
+
function Groups(t0) {
|
|
444
|
+
const $ = _c(2);
|
|
445
|
+
const {
|
|
446
|
+
children
|
|
447
|
+
} = t0;
|
|
448
|
+
let t1;
|
|
449
|
+
if ($[0] !== children) {
|
|
450
|
+
t1 = _jsx(_Fragment, {
|
|
451
|
+
children: children
|
|
452
|
+
});
|
|
453
|
+
$[0] = children;
|
|
454
|
+
$[1] = t1;
|
|
455
|
+
} else {
|
|
456
|
+
t1 = $[1];
|
|
457
|
+
}
|
|
458
|
+
return t1;
|
|
91
459
|
}
|
|
460
|
+
|
|
92
461
|
/**
|
|
93
462
|
* Card-bordered input group for form fields. Use inside `Content.Groups`.
|
|
94
463
|
*
|
|
@@ -100,52 +469,249 @@ function Groups({ children }) {
|
|
|
100
469
|
*
|
|
101
470
|
* `title` renders a SectionHeader label above the card.
|
|
102
471
|
*/
|
|
103
|
-
function Group(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
472
|
+
function Group(t0) {
|
|
473
|
+
const $ = _c(16);
|
|
474
|
+
const {
|
|
475
|
+
children,
|
|
476
|
+
withMargin: t1,
|
|
477
|
+
elevation: t2,
|
|
478
|
+
padding: t3,
|
|
479
|
+
variant: t4,
|
|
480
|
+
title
|
|
481
|
+
} = t0;
|
|
482
|
+
const withMargin = t1 === undefined ? true : t1;
|
|
483
|
+
const elevation = t2 === undefined ? "none" : t2;
|
|
484
|
+
const padding = t3 === undefined ? "md" : t3;
|
|
485
|
+
const variant = t4 === undefined ? "card" : t4;
|
|
486
|
+
let t5;
|
|
487
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
488
|
+
t5 = {
|
|
489
|
+
none: "p-0",
|
|
490
|
+
sm: "p-3",
|
|
491
|
+
md: "p-4",
|
|
492
|
+
lg: "p-6"
|
|
493
|
+
};
|
|
494
|
+
$[0] = t5;
|
|
495
|
+
} else {
|
|
496
|
+
t5 = $[0];
|
|
497
|
+
}
|
|
498
|
+
const paddingClass = t5[padding];
|
|
499
|
+
let t6;
|
|
500
|
+
if ($[1] !== children || $[2] !== elevation || $[3] !== padding || $[4] !== paddingClass || $[5] !== variant) {
|
|
501
|
+
t6 = variant === "plain" ? _jsx(View, {
|
|
502
|
+
className: paddingClass,
|
|
503
|
+
children: children
|
|
504
|
+
}) : _jsx(Display.Card, {
|
|
505
|
+
elevation: elevation,
|
|
506
|
+
padding: padding,
|
|
507
|
+
children: children
|
|
508
|
+
});
|
|
509
|
+
$[1] = children;
|
|
510
|
+
$[2] = elevation;
|
|
511
|
+
$[3] = padding;
|
|
512
|
+
$[4] = paddingClass;
|
|
513
|
+
$[5] = variant;
|
|
514
|
+
$[6] = t6;
|
|
515
|
+
} else {
|
|
516
|
+
t6 = $[6];
|
|
517
|
+
}
|
|
518
|
+
const body = t6;
|
|
519
|
+
let t7;
|
|
520
|
+
if ($[7] !== title) {
|
|
521
|
+
t7 = title ? _jsx(Display.SectionHeader, {
|
|
522
|
+
title: title,
|
|
523
|
+
variant: "group"
|
|
524
|
+
}) : null;
|
|
525
|
+
$[7] = title;
|
|
526
|
+
$[8] = t7;
|
|
527
|
+
} else {
|
|
528
|
+
t7 = $[8];
|
|
529
|
+
}
|
|
530
|
+
const header = t7;
|
|
531
|
+
if (withMargin) {
|
|
532
|
+
let t8;
|
|
533
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
534
|
+
t8 = {
|
|
535
|
+
marginHorizontal: 16,
|
|
536
|
+
marginVertical: 6
|
|
537
|
+
};
|
|
538
|
+
$[9] = t8;
|
|
539
|
+
} else {
|
|
540
|
+
t8 = $[9];
|
|
541
|
+
}
|
|
542
|
+
let t9;
|
|
543
|
+
if ($[10] !== body || $[11] !== header) {
|
|
544
|
+
t9 = _jsxs(View, {
|
|
545
|
+
style: t8,
|
|
546
|
+
children: [header, body]
|
|
547
|
+
});
|
|
548
|
+
$[10] = body;
|
|
549
|
+
$[11] = header;
|
|
550
|
+
$[12] = t9;
|
|
551
|
+
} else {
|
|
552
|
+
t9 = $[12];
|
|
112
553
|
}
|
|
113
|
-
return
|
|
554
|
+
return t9;
|
|
555
|
+
}
|
|
556
|
+
let t8;
|
|
557
|
+
if ($[13] !== body || $[14] !== header) {
|
|
558
|
+
t8 = _jsxs(_Fragment, {
|
|
559
|
+
children: [header, body]
|
|
560
|
+
});
|
|
561
|
+
$[13] = body;
|
|
562
|
+
$[14] = header;
|
|
563
|
+
$[15] = t8;
|
|
564
|
+
} else {
|
|
565
|
+
t8 = $[15];
|
|
566
|
+
}
|
|
567
|
+
return t8;
|
|
114
568
|
}
|
|
569
|
+
|
|
115
570
|
/**
|
|
116
571
|
* Settings-style section: titled card grouping Display.MenuButton rows.
|
|
117
572
|
* Delegates to the standalone `MenuSection` widget — single source of truth
|
|
118
573
|
* for this pattern whether used inside a FormView or on a standalone screen.
|
|
119
574
|
*/
|
|
120
|
-
function Section(
|
|
121
|
-
|
|
575
|
+
function Section(t0) {
|
|
576
|
+
const $ = _c(4);
|
|
577
|
+
const {
|
|
578
|
+
title,
|
|
579
|
+
footer,
|
|
580
|
+
children
|
|
581
|
+
} = t0;
|
|
582
|
+
let t1;
|
|
583
|
+
if ($[0] !== children || $[1] !== footer || $[2] !== title) {
|
|
584
|
+
t1 = _jsx(MenuSection, {
|
|
585
|
+
footer: footer,
|
|
586
|
+
title: title,
|
|
587
|
+
children: children
|
|
588
|
+
});
|
|
589
|
+
$[0] = children;
|
|
590
|
+
$[1] = footer;
|
|
591
|
+
$[2] = title;
|
|
592
|
+
$[3] = t1;
|
|
593
|
+
} else {
|
|
594
|
+
t1 = $[3];
|
|
595
|
+
}
|
|
596
|
+
return t1;
|
|
122
597
|
}
|
|
123
|
-
function Footer(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
598
|
+
function Footer(t0) {
|
|
599
|
+
const $ = _c(18);
|
|
600
|
+
const {
|
|
601
|
+
children
|
|
602
|
+
} = t0;
|
|
603
|
+
const {
|
|
604
|
+
isEmpty,
|
|
605
|
+
isLoading
|
|
606
|
+
} = useFormView();
|
|
607
|
+
const {
|
|
608
|
+
setHeight
|
|
609
|
+
} = useFooterHeight();
|
|
610
|
+
const frame = React.useRef(null);
|
|
611
|
+
const {
|
|
612
|
+
height: windowHeight
|
|
613
|
+
} = useWindowDimensions();
|
|
614
|
+
const [bottomGap, setBottomGap] = React.useState(0);
|
|
615
|
+
let t1;
|
|
616
|
+
let t2;
|
|
617
|
+
if ($[0] !== setHeight) {
|
|
618
|
+
t1 = () => () => setHeight(0);
|
|
619
|
+
t2 = [setHeight];
|
|
620
|
+
$[0] = setHeight;
|
|
621
|
+
$[1] = t1;
|
|
622
|
+
$[2] = t2;
|
|
623
|
+
} else {
|
|
624
|
+
t1 = $[1];
|
|
625
|
+
t2 = $[2];
|
|
626
|
+
}
|
|
627
|
+
React.useEffect(t1, t2);
|
|
628
|
+
if (isEmpty || isLoading) {
|
|
629
|
+
return null;
|
|
630
|
+
}
|
|
631
|
+
let t3;
|
|
632
|
+
if ($[3] !== windowHeight) {
|
|
633
|
+
t3 = () => {
|
|
634
|
+
frame.current?.measureInWindow((_x, y, _width, height) => setBottomGap(Math.max(0, windowHeight - y - height)));
|
|
635
|
+
};
|
|
636
|
+
$[3] = windowHeight;
|
|
637
|
+
$[4] = t3;
|
|
638
|
+
} else {
|
|
639
|
+
t3 = $[4];
|
|
640
|
+
}
|
|
641
|
+
let t4;
|
|
642
|
+
if ($[5] !== bottomGap) {
|
|
643
|
+
t4 = {
|
|
644
|
+
closed: 0,
|
|
645
|
+
opened: bottomGap
|
|
646
|
+
};
|
|
647
|
+
$[5] = bottomGap;
|
|
648
|
+
$[6] = t4;
|
|
649
|
+
} else {
|
|
650
|
+
t4 = $[6];
|
|
651
|
+
}
|
|
652
|
+
let t5;
|
|
653
|
+
if ($[7] !== setHeight) {
|
|
654
|
+
t5 = event => setHeight(event.nativeEvent.layout.height);
|
|
655
|
+
$[7] = setHeight;
|
|
656
|
+
$[8] = t5;
|
|
657
|
+
} else {
|
|
658
|
+
t5 = $[8];
|
|
659
|
+
}
|
|
660
|
+
let t6;
|
|
661
|
+
if ($[9] !== children || $[10] !== t5) {
|
|
662
|
+
t6 = _jsx(View, {
|
|
663
|
+
className: "bg-bg-card px-4 py-3 border-t border-border-light",
|
|
664
|
+
onLayout: t5,
|
|
665
|
+
children: children
|
|
666
|
+
});
|
|
667
|
+
$[9] = children;
|
|
668
|
+
$[10] = t5;
|
|
669
|
+
$[11] = t6;
|
|
670
|
+
} else {
|
|
671
|
+
t6 = $[11];
|
|
672
|
+
}
|
|
673
|
+
let t7;
|
|
674
|
+
if ($[12] !== t4 || $[13] !== t6) {
|
|
675
|
+
t7 = _jsx(KeyboardStickyView, {
|
|
676
|
+
offset: t4,
|
|
677
|
+
children: t6
|
|
678
|
+
});
|
|
679
|
+
$[12] = t4;
|
|
680
|
+
$[13] = t6;
|
|
681
|
+
$[14] = t7;
|
|
682
|
+
} else {
|
|
683
|
+
t7 = $[14];
|
|
684
|
+
}
|
|
685
|
+
let t8;
|
|
686
|
+
if ($[15] !== t3 || $[16] !== t7) {
|
|
687
|
+
t8 = _jsx(View, {
|
|
688
|
+
onLayout: t3,
|
|
689
|
+
ref: frame,
|
|
690
|
+
children: t7
|
|
691
|
+
});
|
|
692
|
+
$[15] = t3;
|
|
693
|
+
$[16] = t7;
|
|
694
|
+
$[17] = t8;
|
|
695
|
+
} else {
|
|
696
|
+
t8 = $[17];
|
|
697
|
+
}
|
|
698
|
+
return t8;
|
|
136
699
|
}
|
|
700
|
+
|
|
137
701
|
// Nested Header components
|
|
138
702
|
const HeaderWithSubComponents = Object.assign(Header, {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
703
|
+
Actions: HeaderActions,
|
|
704
|
+
ActionsBar: HeaderActionsBar,
|
|
705
|
+
Segmented: HeaderSegmented
|
|
142
706
|
});
|
|
707
|
+
|
|
143
708
|
// Nested Content components
|
|
144
709
|
const ContentWithSubComponents = Object.assign(Content, {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
710
|
+
Groups,
|
|
711
|
+
Group,
|
|
712
|
+
Section
|
|
148
713
|
});
|
|
714
|
+
|
|
149
715
|
/**
|
|
150
716
|
* Screen container for a single record (detail / create / edit / settings).
|
|
151
717
|
* Owns safe-area, scroll (KeyboardAware), refresh, and the loading/empty/error states.
|
|
@@ -164,9 +730,9 @@ const ContentWithSubComponents = Object.assign(Content, {
|
|
|
164
730
|
* FormViewV2.Footer — sticky bottom bar (primary CTA)
|
|
165
731
|
*/
|
|
166
732
|
export const FormViewV2 = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
733
|
+
Root: FormViewRoot,
|
|
734
|
+
Header: HeaderWithSubComponents,
|
|
735
|
+
Content: ContentWithSubComponents,
|
|
736
|
+
Footer
|
|
171
737
|
};
|
|
172
738
|
export default FormViewV2;
|