@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/ListViewV2.js
CHANGED
|
@@ -1,259 +1,1408 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FlashList
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { FlashList } from "@shopify/flash-list";
|
|
3
|
+
import { FilterChip } from "../Actions/Actions.FilterButton.js";
|
|
3
4
|
import { Display } from "../Display/index.js";
|
|
4
5
|
import SearchHistory from "../Display/Display.SearchHistory.js";
|
|
5
6
|
import { ErrorBoundary, Feedback } from "../Feedback/index.js";
|
|
6
7
|
import { useBottomInset } from "../layouts/BottomInset.js";
|
|
7
8
|
import Container from "../layouts/Container.js";
|
|
8
9
|
import { Navigation } from "../Navigation/index.js";
|
|
9
|
-
import { SegmentedControl
|
|
10
|
+
import { SegmentedControl } from "../Navigation/Navigation.SegmentedControl.js";
|
|
11
|
+
import Pressable from "../primitives/Pressable.js";
|
|
10
12
|
import { useTheme } from "../theme/index.js";
|
|
11
|
-
import { cn
|
|
13
|
+
import { cn } from "../theme/tw.js";
|
|
12
14
|
import { Typography } from "../Typography/index.js";
|
|
13
15
|
import { ListViewProvider, useListView } from "./ListViewV2.context.js";
|
|
14
16
|
import { toRowItems } from "./types/IListView.js";
|
|
15
|
-
import
|
|
16
|
-
import { RefreshControl, ScrollView,
|
|
17
|
+
import { createContext, useCallback, useContext, useEffect, useEffectEvent, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
|
+
import { RefreshControl, ScrollView, View } from "react-native";
|
|
19
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
17
20
|
const RefreshErrorContext = createContext(undefined);
|
|
18
21
|
export async function refreshListData(onRefresh, onRefreshError, setShowRefreshing) {
|
|
19
|
-
|
|
22
|
+
setShowRefreshing(true);
|
|
23
|
+
try {
|
|
24
|
+
await onRefresh?.();
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error("[ListViewV2] Refresh failed", error);
|
|
20
27
|
try {
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
console.error("[ListViewV2] Refresh failed", error);
|
|
25
|
-
try {
|
|
26
|
-
onRefreshError?.(error);
|
|
27
|
-
}
|
|
28
|
-
catch (callbackError) {
|
|
29
|
-
console.error("[ListViewV2] onRefreshError callback failed", callbackError);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
finally {
|
|
33
|
-
setShowRefreshing(false);
|
|
28
|
+
onRefreshError?.(error);
|
|
29
|
+
} catch (callbackError) {
|
|
30
|
+
console.error("[ListViewV2] onRefreshError callback failed", callbackError);
|
|
34
31
|
}
|
|
32
|
+
} finally {
|
|
33
|
+
setShowRefreshing(false);
|
|
34
|
+
}
|
|
35
35
|
}
|
|
36
|
-
function ListViewRoot(
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
function ListViewRoot(t0) {
|
|
37
|
+
const $ = _c(28);
|
|
38
|
+
const {
|
|
39
|
+
name,
|
|
40
|
+
description,
|
|
41
|
+
items,
|
|
42
|
+
isLoading: t1,
|
|
43
|
+
hasError: t2,
|
|
44
|
+
errorMessage,
|
|
45
|
+
readonly: t3,
|
|
46
|
+
onRefresh,
|
|
47
|
+
onRefreshError,
|
|
48
|
+
onRetry,
|
|
49
|
+
onPressItem,
|
|
50
|
+
onDeleteItem,
|
|
51
|
+
onSearch,
|
|
52
|
+
onBack,
|
|
53
|
+
onLoadMore,
|
|
54
|
+
loadingMore: t4,
|
|
55
|
+
hasMore: t5,
|
|
56
|
+
backgroundColor,
|
|
57
|
+
withContainer: t6,
|
|
58
|
+
edges,
|
|
59
|
+
children
|
|
60
|
+
} = t0;
|
|
61
|
+
const isLoading = t1 === undefined ? false : t1;
|
|
62
|
+
const hasError = t2 === undefined ? false : t2;
|
|
63
|
+
const readonly = t3 === undefined ? false : t3;
|
|
64
|
+
const loadingMore = t4 === undefined ? false : t4;
|
|
65
|
+
const hasMore = t5 === undefined ? true : t5;
|
|
66
|
+
const withContainer = t6 === undefined ? true : t6;
|
|
67
|
+
let t7;
|
|
68
|
+
if ($[0] !== backgroundColor) {
|
|
69
|
+
t7 = backgroundColor ? {
|
|
70
|
+
backgroundColor
|
|
71
|
+
} : undefined;
|
|
72
|
+
$[0] = backgroundColor;
|
|
73
|
+
$[1] = t7;
|
|
74
|
+
} else {
|
|
75
|
+
t7 = $[1];
|
|
76
|
+
}
|
|
77
|
+
const style = t7;
|
|
78
|
+
let t8;
|
|
79
|
+
if ($[2] !== children || $[3] !== edges || $[4] !== style || $[5] !== withContainer) {
|
|
80
|
+
t8 = _jsx(ErrorBoundary, {
|
|
81
|
+
children: withContainer ? _jsx(Container, {
|
|
82
|
+
edges: edges,
|
|
83
|
+
style: style,
|
|
84
|
+
children: children
|
|
85
|
+
}) : _jsx(View, {
|
|
86
|
+
className: "flex-1 bg-bg-page",
|
|
87
|
+
style: style,
|
|
88
|
+
children: children
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
$[2] = children;
|
|
92
|
+
$[3] = edges;
|
|
93
|
+
$[4] = style;
|
|
94
|
+
$[5] = withContainer;
|
|
95
|
+
$[6] = t8;
|
|
96
|
+
} else {
|
|
97
|
+
t8 = $[6];
|
|
98
|
+
}
|
|
99
|
+
let t9;
|
|
100
|
+
if ($[7] !== onRefreshError || $[8] !== t8) {
|
|
101
|
+
t9 = _jsx(RefreshErrorContext.Provider, {
|
|
102
|
+
value: onRefreshError,
|
|
103
|
+
children: t8
|
|
104
|
+
});
|
|
105
|
+
$[7] = onRefreshError;
|
|
106
|
+
$[8] = t8;
|
|
107
|
+
$[9] = t9;
|
|
108
|
+
} else {
|
|
109
|
+
t9 = $[9];
|
|
110
|
+
}
|
|
111
|
+
let t10;
|
|
112
|
+
if ($[10] !== description || $[11] !== errorMessage || $[12] !== hasError || $[13] !== hasMore || $[14] !== isLoading || $[15] !== items || $[16] !== loadingMore || $[17] !== name || $[18] !== onBack || $[19] !== onDeleteItem || $[20] !== onLoadMore || $[21] !== onPressItem || $[22] !== onRefresh || $[23] !== onRetry || $[24] !== onSearch || $[25] !== readonly || $[26] !== t9) {
|
|
113
|
+
t10 = _jsx(ListViewProvider, {
|
|
114
|
+
description: description,
|
|
115
|
+
errorMessage: errorMessage,
|
|
116
|
+
hasError: hasError,
|
|
117
|
+
hasMore: hasMore,
|
|
118
|
+
isLoading: isLoading,
|
|
119
|
+
items: items,
|
|
120
|
+
loadingMore: loadingMore,
|
|
121
|
+
name: name,
|
|
122
|
+
onBack: onBack,
|
|
123
|
+
onDeleteItem: onDeleteItem,
|
|
124
|
+
onLoadMore: onLoadMore,
|
|
125
|
+
onPressItem: onPressItem,
|
|
126
|
+
onRefresh: onRefresh,
|
|
127
|
+
onRetry: onRetry,
|
|
128
|
+
onSearch: onSearch,
|
|
129
|
+
readonly: readonly,
|
|
130
|
+
children: t9
|
|
131
|
+
});
|
|
132
|
+
$[10] = description;
|
|
133
|
+
$[11] = errorMessage;
|
|
134
|
+
$[12] = hasError;
|
|
135
|
+
$[13] = hasMore;
|
|
136
|
+
$[14] = isLoading;
|
|
137
|
+
$[15] = items;
|
|
138
|
+
$[16] = loadingMore;
|
|
139
|
+
$[17] = name;
|
|
140
|
+
$[18] = onBack;
|
|
141
|
+
$[19] = onDeleteItem;
|
|
142
|
+
$[20] = onLoadMore;
|
|
143
|
+
$[21] = onPressItem;
|
|
144
|
+
$[22] = onRefresh;
|
|
145
|
+
$[23] = onRetry;
|
|
146
|
+
$[24] = onSearch;
|
|
147
|
+
$[25] = readonly;
|
|
148
|
+
$[26] = t9;
|
|
149
|
+
$[27] = t10;
|
|
150
|
+
} else {
|
|
151
|
+
t10 = $[27];
|
|
152
|
+
}
|
|
153
|
+
return t10;
|
|
39
154
|
}
|
|
40
|
-
function Header(
|
|
41
|
-
|
|
42
|
-
|
|
155
|
+
function Header(t0) {
|
|
156
|
+
const $ = _c(11);
|
|
157
|
+
const {
|
|
158
|
+
safeArea: t1,
|
|
159
|
+
variant: t2,
|
|
160
|
+
tone,
|
|
161
|
+
actions,
|
|
162
|
+
children,
|
|
163
|
+
background,
|
|
164
|
+
topSpacing
|
|
165
|
+
} = t0;
|
|
166
|
+
const safeArea = t1 === undefined ? true : t1;
|
|
167
|
+
const variant = t2 === undefined ? "large" : t2;
|
|
168
|
+
const {
|
|
169
|
+
name,
|
|
170
|
+
description,
|
|
171
|
+
onBack
|
|
172
|
+
} = useListView();
|
|
173
|
+
const t3 = description ?? undefined;
|
|
174
|
+
let t4;
|
|
175
|
+
if ($[0] !== actions || $[1] !== background || $[2] !== children || $[3] !== name || $[4] !== onBack || $[5] !== safeArea || $[6] !== t3 || $[7] !== tone || $[8] !== topSpacing || $[9] !== variant) {
|
|
176
|
+
t4 = _jsx(Navigation.AppBar, {
|
|
177
|
+
actions: actions,
|
|
178
|
+
background: background,
|
|
179
|
+
onBack: onBack,
|
|
180
|
+
safeArea: safeArea,
|
|
181
|
+
subheader: children,
|
|
182
|
+
subtitle: t3,
|
|
183
|
+
title: name,
|
|
184
|
+
tone: tone,
|
|
185
|
+
topSpacing: topSpacing,
|
|
186
|
+
variant: variant
|
|
187
|
+
});
|
|
188
|
+
$[0] = actions;
|
|
189
|
+
$[1] = background;
|
|
190
|
+
$[2] = children;
|
|
191
|
+
$[3] = name;
|
|
192
|
+
$[4] = onBack;
|
|
193
|
+
$[5] = safeArea;
|
|
194
|
+
$[6] = t3;
|
|
195
|
+
$[7] = tone;
|
|
196
|
+
$[8] = topSpacing;
|
|
197
|
+
$[9] = variant;
|
|
198
|
+
$[10] = t4;
|
|
199
|
+
} else {
|
|
200
|
+
t4 = $[10];
|
|
201
|
+
}
|
|
202
|
+
return t4;
|
|
43
203
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
204
|
+
const SEARCH_DEBOUNCE_MS = 400;
|
|
205
|
+
function HeaderSearch(t0) {
|
|
206
|
+
const $ = _c(11);
|
|
207
|
+
const {
|
|
208
|
+
searchQuery: t1,
|
|
209
|
+
textVariant
|
|
210
|
+
} = t0;
|
|
211
|
+
const searchQuery = t1 === undefined ? "" : t1;
|
|
212
|
+
const {
|
|
213
|
+
name,
|
|
214
|
+
onSearch
|
|
215
|
+
} = useListView();
|
|
216
|
+
const [query, setQuery] = useState(searchQuery);
|
|
217
|
+
let t2;
|
|
218
|
+
if ($[0] !== onSearch) {
|
|
219
|
+
t2 = value => onSearch?.(value);
|
|
220
|
+
$[0] = onSearch;
|
|
221
|
+
$[1] = t2;
|
|
222
|
+
} else {
|
|
223
|
+
t2 = $[1];
|
|
224
|
+
}
|
|
225
|
+
const search = useEffectEvent(t2);
|
|
226
|
+
let t3;
|
|
227
|
+
if ($[2] !== query || $[3] !== search) {
|
|
228
|
+
t3 = () => {
|
|
229
|
+
const timeout = setTimeout(() => search(query), SEARCH_DEBOUNCE_MS);
|
|
230
|
+
return () => clearTimeout(timeout);
|
|
231
|
+
};
|
|
232
|
+
$[2] = query;
|
|
233
|
+
$[3] = search;
|
|
234
|
+
$[4] = t3;
|
|
235
|
+
} else {
|
|
236
|
+
t3 = $[4];
|
|
237
|
+
}
|
|
238
|
+
let t4;
|
|
239
|
+
if ($[5] !== query) {
|
|
240
|
+
t4 = [query];
|
|
241
|
+
$[5] = query;
|
|
242
|
+
$[6] = t4;
|
|
243
|
+
} else {
|
|
244
|
+
t4 = $[6];
|
|
245
|
+
}
|
|
246
|
+
useEffect(t3, t4);
|
|
247
|
+
if (!onSearch) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
const t5 = `Buscar ${name}`;
|
|
251
|
+
let t6;
|
|
252
|
+
if ($[7] !== query || $[8] !== t5 || $[9] !== textVariant) {
|
|
253
|
+
t6 = _jsx(View, {
|
|
254
|
+
className: "pb-2",
|
|
255
|
+
children: _jsx(Navigation.SearchBar, {
|
|
256
|
+
onChangeText: setQuery,
|
|
257
|
+
placeholder: t5,
|
|
258
|
+
textVariant: textVariant,
|
|
259
|
+
value: query
|
|
260
|
+
})
|
|
261
|
+
});
|
|
262
|
+
$[7] = query;
|
|
263
|
+
$[8] = t5;
|
|
264
|
+
$[9] = textVariant;
|
|
265
|
+
$[10] = t6;
|
|
266
|
+
} else {
|
|
267
|
+
t6 = $[10];
|
|
268
|
+
}
|
|
269
|
+
return t6;
|
|
67
270
|
}
|
|
68
|
-
function HeaderActions(
|
|
69
|
-
|
|
271
|
+
function HeaderActions(t0) {
|
|
272
|
+
const $ = _c(2);
|
|
273
|
+
const {
|
|
274
|
+
children
|
|
275
|
+
} = t0;
|
|
276
|
+
let t1;
|
|
277
|
+
if ($[0] !== children) {
|
|
278
|
+
t1 = _jsx(View, {
|
|
279
|
+
className: "flex-row px-4 my-2 items-center justify-between flex-1 gap-2",
|
|
280
|
+
children: children
|
|
281
|
+
});
|
|
282
|
+
$[0] = children;
|
|
283
|
+
$[1] = t1;
|
|
284
|
+
} else {
|
|
285
|
+
t1 = $[1];
|
|
286
|
+
}
|
|
287
|
+
return t1;
|
|
70
288
|
}
|
|
289
|
+
|
|
71
290
|
/** Secondary action bar docked below the AppBar — use for Save/Cancel, filter chips, etc. */
|
|
72
|
-
function HeaderActionsBar(
|
|
73
|
-
|
|
291
|
+
function HeaderActionsBar(t0) {
|
|
292
|
+
const $ = _c(2);
|
|
293
|
+
const {
|
|
294
|
+
children
|
|
295
|
+
} = t0;
|
|
296
|
+
let t1;
|
|
297
|
+
if ($[0] !== children) {
|
|
298
|
+
t1 = _jsx(View, {
|
|
299
|
+
className: "bg-bg-card px-4 pt-1 pb-3 border-b border-border-light flex-row gap-2 items-center",
|
|
300
|
+
children: children
|
|
301
|
+
});
|
|
302
|
+
$[0] = children;
|
|
303
|
+
$[1] = t1;
|
|
304
|
+
} else {
|
|
305
|
+
t1 = $[1];
|
|
306
|
+
}
|
|
307
|
+
return t1;
|
|
74
308
|
}
|
|
309
|
+
|
|
75
310
|
/**
|
|
76
311
|
* Tab-like segmented switch for the header subheader (e.g. "Activos" / "Archivados").
|
|
77
312
|
* Use as a child of `<ListViewV2.Header>` — it lands in the AppBar subheader slot.
|
|
78
313
|
*/
|
|
79
314
|
function HeaderSegmented(props) {
|
|
80
|
-
|
|
315
|
+
const $ = _c(2);
|
|
316
|
+
let t0;
|
|
317
|
+
if ($[0] !== props) {
|
|
318
|
+
t0 = _jsx(SegmentedControl, {
|
|
319
|
+
...props
|
|
320
|
+
});
|
|
321
|
+
$[0] = props;
|
|
322
|
+
$[1] = t0;
|
|
323
|
+
} else {
|
|
324
|
+
t0 = $[1];
|
|
325
|
+
}
|
|
326
|
+
return t0;
|
|
81
327
|
}
|
|
328
|
+
|
|
82
329
|
/**
|
|
83
330
|
* Recent-searches list. Render as a SIBLING of the Header (like Filters/ActionsBar) —
|
|
84
331
|
* typically while the search query is empty. Delegates to `Display.SearchHistory`.
|
|
85
332
|
*/
|
|
86
333
|
function HeaderSearchHistory(props) {
|
|
87
|
-
|
|
334
|
+
const $ = _c(2);
|
|
335
|
+
let t0;
|
|
336
|
+
if ($[0] !== props) {
|
|
337
|
+
t0 = _jsx(SearchHistory, {
|
|
338
|
+
...props
|
|
339
|
+
});
|
|
340
|
+
$[0] = props;
|
|
341
|
+
$[1] = t0;
|
|
342
|
+
} else {
|
|
343
|
+
t0 = $[1];
|
|
344
|
+
}
|
|
345
|
+
return t0;
|
|
88
346
|
}
|
|
89
|
-
function HeaderFilters(
|
|
90
|
-
|
|
347
|
+
function HeaderFilters(t0) {
|
|
348
|
+
const $ = _c(2);
|
|
349
|
+
const {
|
|
350
|
+
children
|
|
351
|
+
} = t0;
|
|
352
|
+
let t1;
|
|
353
|
+
if ($[0] !== children) {
|
|
354
|
+
t1 = _jsx(View, {
|
|
355
|
+
className: "px-4 py-2 items-center",
|
|
356
|
+
children: children
|
|
357
|
+
});
|
|
358
|
+
$[0] = children;
|
|
359
|
+
$[1] = t1;
|
|
360
|
+
} else {
|
|
361
|
+
t1 = $[1];
|
|
362
|
+
}
|
|
363
|
+
return t1;
|
|
91
364
|
}
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
365
|
+
function FilterChips(t0) {
|
|
366
|
+
const $ = _c(4);
|
|
367
|
+
const {
|
|
368
|
+
children
|
|
369
|
+
} = t0;
|
|
370
|
+
let t1;
|
|
371
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
372
|
+
t1 = {
|
|
373
|
+
paddingHorizontal: 16,
|
|
374
|
+
gap: 8
|
|
375
|
+
};
|
|
376
|
+
$[0] = t1;
|
|
377
|
+
} else {
|
|
378
|
+
t1 = $[0];
|
|
379
|
+
}
|
|
380
|
+
let t2;
|
|
381
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
382
|
+
t2 = {
|
|
383
|
+
flexGrow: 0
|
|
384
|
+
};
|
|
385
|
+
$[1] = t2;
|
|
386
|
+
} else {
|
|
387
|
+
t2 = $[1];
|
|
388
|
+
}
|
|
389
|
+
let t3;
|
|
390
|
+
if ($[2] !== children) {
|
|
391
|
+
t3 = _jsx(ScrollView, {
|
|
392
|
+
contentContainerStyle: t1,
|
|
393
|
+
horizontal: true,
|
|
394
|
+
showsHorizontalScrollIndicator: false,
|
|
395
|
+
style: t2,
|
|
396
|
+
children: children
|
|
397
|
+
});
|
|
398
|
+
$[2] = children;
|
|
399
|
+
$[3] = t3;
|
|
400
|
+
} else {
|
|
401
|
+
t3 = $[3];
|
|
402
|
+
}
|
|
403
|
+
return t3;
|
|
117
404
|
}
|
|
405
|
+
|
|
406
|
+
/** A row on screen, as the screen knows it: the original item and its position. */
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Recycling and viewport options in the DS vocabulary. The engine behind them
|
|
410
|
+
* (FlashList v2 today) can change without touching a screen.
|
|
411
|
+
*/
|
|
412
|
+
|
|
413
|
+
/** Imperative scroll for `ListViewV2.Content ref`. Calls are ignored while no list is shown. */
|
|
414
|
+
|
|
415
|
+
const VIEW_POSITION = {
|
|
416
|
+
start: 0,
|
|
417
|
+
center: 0.5,
|
|
418
|
+
end: 1
|
|
419
|
+
};
|
|
420
|
+
const KEEP_POSITION_OFF = {
|
|
421
|
+
disabled: true
|
|
422
|
+
};
|
|
118
423
|
function rowKey(row) {
|
|
119
|
-
|
|
424
|
+
return String(row.id);
|
|
120
425
|
}
|
|
121
|
-
function ContentList(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
426
|
+
function ContentList(t0) {
|
|
427
|
+
const $ = _c(61);
|
|
428
|
+
const {
|
|
429
|
+
children,
|
|
430
|
+
contentWithMargin,
|
|
431
|
+
keyboardShouldPersistTaps,
|
|
432
|
+
keyboardDismissMode,
|
|
433
|
+
testID,
|
|
434
|
+
tuning,
|
|
435
|
+
engineRef,
|
|
436
|
+
contentContainerStyle
|
|
437
|
+
} = t0;
|
|
438
|
+
const {
|
|
439
|
+
items,
|
|
440
|
+
onRefresh,
|
|
441
|
+
showRefreshing,
|
|
442
|
+
setShowRefreshing,
|
|
443
|
+
onPressItem,
|
|
444
|
+
onDeleteItem,
|
|
445
|
+
readonly,
|
|
446
|
+
onLoadMore,
|
|
447
|
+
loadingMore,
|
|
448
|
+
hasMore
|
|
449
|
+
} = useListView();
|
|
450
|
+
const bottomInset = useBottomInset();
|
|
451
|
+
const theme = useTheme();
|
|
452
|
+
let t1;
|
|
453
|
+
if ($[0] !== items) {
|
|
454
|
+
t1 = toRowItems(items);
|
|
455
|
+
$[0] = items;
|
|
456
|
+
$[1] = t1;
|
|
457
|
+
} else {
|
|
458
|
+
t1 = $[1];
|
|
459
|
+
}
|
|
460
|
+
const rowItems = t1;
|
|
461
|
+
const onRefreshError = useContext(RefreshErrorContext);
|
|
462
|
+
let t2;
|
|
463
|
+
if ($[2] !== onRefresh || $[3] !== onRefreshError || $[4] !== setShowRefreshing) {
|
|
464
|
+
t2 = async () => {
|
|
465
|
+
await refreshListData(onRefresh, onRefreshError, setShowRefreshing);
|
|
466
|
+
};
|
|
467
|
+
$[2] = onRefresh;
|
|
468
|
+
$[3] = onRefreshError;
|
|
469
|
+
$[4] = setShowRefreshing;
|
|
470
|
+
$[5] = t2;
|
|
471
|
+
} else {
|
|
472
|
+
t2 = $[5];
|
|
473
|
+
}
|
|
474
|
+
const handleRefresh = t2;
|
|
475
|
+
let t3;
|
|
476
|
+
if ($[6] !== children || $[7] !== onDeleteItem || $[8] !== onPressItem || $[9] !== readonly) {
|
|
477
|
+
t3 = t4 => {
|
|
478
|
+
const {
|
|
479
|
+
item: row
|
|
480
|
+
} = t4;
|
|
481
|
+
if (children) {
|
|
482
|
+
return _jsx(_Fragment, {
|
|
483
|
+
children: children(row.item, row)
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
const onPress = () => onPressItem?.(row.item);
|
|
487
|
+
const onDelete = () => onDeleteItem?.(row.item);
|
|
488
|
+
const isReadOnly = row.readonly || readonly || false;
|
|
489
|
+
return _jsx(Navigation.RowItem, {
|
|
490
|
+
item: row,
|
|
491
|
+
onDelete: onDelete,
|
|
492
|
+
onPress: onPress,
|
|
493
|
+
readonly: isReadOnly
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
$[6] = children;
|
|
497
|
+
$[7] = onDeleteItem;
|
|
498
|
+
$[8] = onPressItem;
|
|
499
|
+
$[9] = readonly;
|
|
500
|
+
$[10] = t3;
|
|
501
|
+
} else {
|
|
502
|
+
t3 = $[10];
|
|
503
|
+
}
|
|
504
|
+
const renderItem = t3;
|
|
505
|
+
const rowType = tuning?.rowType;
|
|
506
|
+
let t4;
|
|
507
|
+
if ($[11] !== rowType) {
|
|
508
|
+
t4 = rowType ? (row_0, index) => rowType(row_0.item, index) : undefined;
|
|
509
|
+
$[11] = rowType;
|
|
510
|
+
$[12] = t4;
|
|
511
|
+
} else {
|
|
512
|
+
t4 = $[12];
|
|
513
|
+
}
|
|
514
|
+
const getItemType = t4;
|
|
515
|
+
const onVisibleRowsChange = tuning?.onVisibleRowsChange;
|
|
516
|
+
let t5;
|
|
517
|
+
if ($[13] !== onVisibleRowsChange) {
|
|
518
|
+
t5 = onVisibleRowsChange ? t6 => {
|
|
519
|
+
const {
|
|
520
|
+
viewableItems
|
|
521
|
+
} = t6;
|
|
522
|
+
return onVisibleRowsChange(viewableItems.flatMap(_temp));
|
|
523
|
+
} : undefined;
|
|
524
|
+
$[13] = onVisibleRowsChange;
|
|
525
|
+
$[14] = t5;
|
|
526
|
+
} else {
|
|
527
|
+
t5 = $[14];
|
|
528
|
+
}
|
|
529
|
+
const onViewableItemsChanged = t5;
|
|
530
|
+
const visiblePercent = tuning?.visiblePercent;
|
|
531
|
+
let t6;
|
|
532
|
+
if ($[15] !== visiblePercent) {
|
|
533
|
+
t6 = visiblePercent === undefined ? undefined : {
|
|
534
|
+
itemVisiblePercentThreshold: visiblePercent
|
|
535
|
+
};
|
|
536
|
+
$[15] = visiblePercent;
|
|
537
|
+
$[16] = t6;
|
|
538
|
+
} else {
|
|
539
|
+
t6 = $[16];
|
|
540
|
+
}
|
|
541
|
+
const viewabilityConfig = t6;
|
|
542
|
+
const t7 = contentWithMargin ? 4 : 0;
|
|
543
|
+
let t8;
|
|
544
|
+
if ($[17] !== t7 || $[18] !== theme.bg.page) {
|
|
545
|
+
t8 = {
|
|
546
|
+
flex: 1,
|
|
547
|
+
marginTop: 2,
|
|
548
|
+
paddingHorizontal: t7,
|
|
549
|
+
backgroundColor: theme.bg.page
|
|
550
|
+
};
|
|
551
|
+
$[17] = t7;
|
|
552
|
+
$[18] = theme.bg.page;
|
|
553
|
+
$[19] = t8;
|
|
554
|
+
} else {
|
|
555
|
+
t8 = $[19];
|
|
556
|
+
}
|
|
557
|
+
let t9;
|
|
558
|
+
if ($[20] !== bottomInset) {
|
|
559
|
+
t9 = bottomInset ? {
|
|
560
|
+
paddingBottom: bottomInset
|
|
561
|
+
} : undefined;
|
|
562
|
+
$[20] = bottomInset;
|
|
563
|
+
$[21] = t9;
|
|
564
|
+
} else {
|
|
565
|
+
t9 = $[21];
|
|
566
|
+
}
|
|
567
|
+
let t10;
|
|
568
|
+
if ($[22] !== contentContainerStyle || $[23] !== t9) {
|
|
569
|
+
t10 = [t9, contentContainerStyle];
|
|
570
|
+
$[22] = contentContainerStyle;
|
|
571
|
+
$[23] = t9;
|
|
572
|
+
$[24] = t10;
|
|
573
|
+
} else {
|
|
574
|
+
t10 = $[24];
|
|
575
|
+
}
|
|
576
|
+
const t11 = tuning?.drawDistance;
|
|
577
|
+
const t12 = tuning?.extraData;
|
|
578
|
+
const t13 = tuning?.initialIndex;
|
|
579
|
+
let t14;
|
|
580
|
+
if ($[25] !== loadingMore) {
|
|
581
|
+
t14 = loadingMore ? _jsx(View, {
|
|
582
|
+
className: "py-4",
|
|
583
|
+
children: _jsx(Feedback.Spinner, {
|
|
584
|
+
size: "small"
|
|
585
|
+
})
|
|
586
|
+
}) : undefined;
|
|
587
|
+
$[25] = loadingMore;
|
|
588
|
+
$[26] = t14;
|
|
589
|
+
} else {
|
|
590
|
+
t14 = $[26];
|
|
591
|
+
}
|
|
592
|
+
const t15 = tuning?.keepVisiblePosition ? undefined : KEEP_POSITION_OFF;
|
|
593
|
+
let t16;
|
|
594
|
+
if ($[27] !== hasMore || $[28] !== loadingMore || $[29] !== onLoadMore || $[30] !== showRefreshing) {
|
|
595
|
+
t16 = onLoadMore ? () => {
|
|
596
|
+
if (hasMore && !loadingMore && !showRefreshing) {
|
|
597
|
+
onLoadMore();
|
|
598
|
+
}
|
|
599
|
+
} : undefined;
|
|
600
|
+
$[27] = hasMore;
|
|
601
|
+
$[28] = loadingMore;
|
|
602
|
+
$[29] = onLoadMore;
|
|
603
|
+
$[30] = showRefreshing;
|
|
604
|
+
$[31] = t16;
|
|
605
|
+
} else {
|
|
606
|
+
t16 = $[31];
|
|
607
|
+
}
|
|
608
|
+
const t17 = tuning?.loadMoreThreshold ?? 0.5;
|
|
609
|
+
let t18;
|
|
610
|
+
if ($[32] !== theme.primary) {
|
|
611
|
+
t18 = [theme.primary];
|
|
612
|
+
$[32] = theme.primary;
|
|
613
|
+
$[33] = t18;
|
|
614
|
+
} else {
|
|
615
|
+
t18 = $[33];
|
|
616
|
+
}
|
|
617
|
+
let t19;
|
|
618
|
+
if ($[34] !== handleRefresh || $[35] !== showRefreshing || $[36] !== t18) {
|
|
619
|
+
t19 = _jsx(RefreshControl, {
|
|
620
|
+
colors: t18,
|
|
621
|
+
onRefresh: handleRefresh,
|
|
622
|
+
refreshing: showRefreshing
|
|
623
|
+
});
|
|
624
|
+
$[34] = handleRefresh;
|
|
625
|
+
$[35] = showRefreshing;
|
|
626
|
+
$[36] = t18;
|
|
627
|
+
$[37] = t19;
|
|
628
|
+
} else {
|
|
629
|
+
t19 = $[37];
|
|
630
|
+
}
|
|
631
|
+
let t20;
|
|
632
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
633
|
+
t20 = {
|
|
634
|
+
flex: 1
|
|
635
|
+
};
|
|
636
|
+
$[38] = t20;
|
|
637
|
+
} else {
|
|
638
|
+
t20 = $[38];
|
|
639
|
+
}
|
|
640
|
+
let t21;
|
|
641
|
+
if ($[39] !== engineRef || $[40] !== getItemType || $[41] !== keyboardDismissMode || $[42] !== keyboardShouldPersistTaps || $[43] !== onViewableItemsChanged || $[44] !== renderItem || $[45] !== rowItems || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== t14 || $[51] !== t15 || $[52] !== t16 || $[53] !== t17 || $[54] !== t19 || $[55] !== testID || $[56] !== viewabilityConfig) {
|
|
642
|
+
t21 = _jsx(FlashList, {
|
|
643
|
+
contentContainerStyle: t10,
|
|
644
|
+
data: rowItems,
|
|
645
|
+
drawDistance: t11,
|
|
646
|
+
extraData: t12,
|
|
647
|
+
getItemType: getItemType,
|
|
648
|
+
initialScrollIndex: t13,
|
|
649
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
650
|
+
keyboardShouldPersistTaps: keyboardShouldPersistTaps,
|
|
651
|
+
keyExtractor: rowKey,
|
|
652
|
+
ListFooterComponent: t14,
|
|
653
|
+
maintainVisibleContentPosition: t15,
|
|
654
|
+
onEndReached: t16,
|
|
655
|
+
onEndReachedThreshold: t17,
|
|
656
|
+
onViewableItemsChanged: onViewableItemsChanged,
|
|
657
|
+
ref: engineRef,
|
|
658
|
+
refreshControl: t19,
|
|
659
|
+
renderItem: renderItem,
|
|
660
|
+
showsVerticalScrollIndicator: false,
|
|
661
|
+
style: t20,
|
|
662
|
+
testID: testID,
|
|
663
|
+
viewabilityConfig: viewabilityConfig
|
|
664
|
+
});
|
|
665
|
+
$[39] = engineRef;
|
|
666
|
+
$[40] = getItemType;
|
|
667
|
+
$[41] = keyboardDismissMode;
|
|
668
|
+
$[42] = keyboardShouldPersistTaps;
|
|
669
|
+
$[43] = onViewableItemsChanged;
|
|
670
|
+
$[44] = renderItem;
|
|
671
|
+
$[45] = rowItems;
|
|
672
|
+
$[46] = t10;
|
|
673
|
+
$[47] = t11;
|
|
674
|
+
$[48] = t12;
|
|
675
|
+
$[49] = t13;
|
|
676
|
+
$[50] = t14;
|
|
677
|
+
$[51] = t15;
|
|
678
|
+
$[52] = t16;
|
|
679
|
+
$[53] = t17;
|
|
680
|
+
$[54] = t19;
|
|
681
|
+
$[55] = testID;
|
|
682
|
+
$[56] = viewabilityConfig;
|
|
683
|
+
$[57] = t21;
|
|
684
|
+
} else {
|
|
685
|
+
t21 = $[57];
|
|
686
|
+
}
|
|
687
|
+
let t22;
|
|
688
|
+
if ($[58] !== t21 || $[59] !== t8) {
|
|
689
|
+
t22 = _jsx(View, {
|
|
690
|
+
style: t8,
|
|
691
|
+
children: t21
|
|
692
|
+
});
|
|
693
|
+
$[58] = t21;
|
|
694
|
+
$[59] = t8;
|
|
695
|
+
$[60] = t22;
|
|
696
|
+
} else {
|
|
697
|
+
t22 = $[60];
|
|
698
|
+
}
|
|
699
|
+
return t22;
|
|
153
700
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
701
|
+
function _temp(token) {
|
|
702
|
+
return token.index === null ? [] : [{
|
|
703
|
+
item: token.item.item,
|
|
704
|
+
index: token.index
|
|
705
|
+
}];
|
|
706
|
+
}
|
|
707
|
+
function Content(t0) {
|
|
708
|
+
const $ = _c(72);
|
|
709
|
+
const {
|
|
710
|
+
children,
|
|
711
|
+
withMargin: t1,
|
|
712
|
+
keyboardShouldPersistTaps: t2,
|
|
713
|
+
keyboardDismissMode: t3,
|
|
714
|
+
testID,
|
|
715
|
+
tuning,
|
|
716
|
+
contentContainerStyle,
|
|
717
|
+
ref
|
|
718
|
+
} = t0;
|
|
719
|
+
const withMargin = t1 === undefined ? true : t1;
|
|
720
|
+
const keyboardShouldPersistTaps = t2 === undefined ? "handled" : t2;
|
|
721
|
+
const keyboardDismissMode = t3 === undefined ? "none" : t3;
|
|
722
|
+
const {
|
|
723
|
+
name,
|
|
724
|
+
items,
|
|
725
|
+
isLoading,
|
|
726
|
+
hasError,
|
|
727
|
+
errorMessage,
|
|
728
|
+
onRefresh,
|
|
729
|
+
onRetry,
|
|
730
|
+
onBack,
|
|
731
|
+
showRefreshing,
|
|
732
|
+
setShowRefreshing
|
|
733
|
+
} = useListView();
|
|
734
|
+
const bottomInset = useBottomInset();
|
|
735
|
+
const theme = useTheme();
|
|
736
|
+
const onRefreshError = useContext(RefreshErrorContext);
|
|
737
|
+
const engineRef = useRef(null);
|
|
738
|
+
const count = items.length;
|
|
739
|
+
let t4;
|
|
740
|
+
let t5;
|
|
741
|
+
if ($[0] !== count) {
|
|
742
|
+
t4 = () => ({
|
|
743
|
+
scrollToIndex: async (index, options) => {
|
|
744
|
+
if (index < 0 || index >= count) {
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
await engineRef.current?.scrollToIndex({
|
|
748
|
+
index,
|
|
749
|
+
animated: options?.animated ?? true,
|
|
750
|
+
viewPosition: VIEW_POSITION[options?.position ?? "start"]
|
|
751
|
+
});
|
|
752
|
+
},
|
|
753
|
+
scrollToTop: options_0 => engineRef.current?.scrollToTop({
|
|
754
|
+
animated: options_0?.animated ?? true
|
|
755
|
+
}),
|
|
756
|
+
scrollToEnd: options_1 => engineRef.current?.scrollToEnd({
|
|
757
|
+
animated: options_1?.animated ?? true
|
|
758
|
+
})
|
|
759
|
+
});
|
|
760
|
+
t5 = [count];
|
|
761
|
+
$[0] = count;
|
|
762
|
+
$[1] = t4;
|
|
763
|
+
$[2] = t5;
|
|
764
|
+
} else {
|
|
765
|
+
t4 = $[1];
|
|
766
|
+
t5 = $[2];
|
|
767
|
+
}
|
|
768
|
+
useImperativeHandle(ref, t4, t5);
|
|
769
|
+
let t6;
|
|
770
|
+
if ($[3] !== onRefresh || $[4] !== onRefreshError || $[5] !== setShowRefreshing) {
|
|
771
|
+
t6 = async () => {
|
|
772
|
+
await refreshListData(onRefresh, onRefreshError, setShowRefreshing);
|
|
773
|
+
};
|
|
774
|
+
$[3] = onRefresh;
|
|
775
|
+
$[4] = onRefreshError;
|
|
776
|
+
$[5] = setShowRefreshing;
|
|
777
|
+
$[6] = t6;
|
|
778
|
+
} else {
|
|
779
|
+
t6 = $[6];
|
|
780
|
+
}
|
|
781
|
+
const handleRefresh = t6;
|
|
782
|
+
if (isLoading) {
|
|
783
|
+
const t7 = `Cargando ${name}...`;
|
|
784
|
+
let t8;
|
|
785
|
+
if ($[7] !== t7) {
|
|
786
|
+
t8 = _jsx(Feedback.Loading, {
|
|
787
|
+
message: t7
|
|
788
|
+
});
|
|
789
|
+
$[7] = t7;
|
|
790
|
+
$[8] = t8;
|
|
791
|
+
} else {
|
|
792
|
+
t8 = $[8];
|
|
164
793
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
794
|
+
return t8;
|
|
795
|
+
}
|
|
796
|
+
if (hasError) {
|
|
797
|
+
let t7;
|
|
798
|
+
if ($[9] !== bottomInset) {
|
|
799
|
+
t7 = {
|
|
800
|
+
flexGrow: 1,
|
|
801
|
+
justifyContent: "center",
|
|
802
|
+
alignItems: "center",
|
|
803
|
+
paddingBottom: bottomInset
|
|
804
|
+
};
|
|
805
|
+
$[9] = bottomInset;
|
|
806
|
+
$[10] = t7;
|
|
807
|
+
} else {
|
|
808
|
+
t7 = $[10];
|
|
175
809
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
contentContainerStyle,
|
|
185
|
-
], keyboardDismissMode: keyboardDismissMode, keyboardShouldPersistTaps: keyboardShouldPersistTaps, refreshControl: _jsx(RefreshControl, { colors: [theme.primary], onRefresh: handleRefresh, refreshing: showRefreshing }), style: { backgroundColor: theme.bg.page }, testID: testID, children: _jsx(Feedback.Empty, {}) }));
|
|
810
|
+
let t8;
|
|
811
|
+
if ($[11] !== contentContainerStyle || $[12] !== t7) {
|
|
812
|
+
t8 = [t7, contentContainerStyle];
|
|
813
|
+
$[11] = contentContainerStyle;
|
|
814
|
+
$[12] = t7;
|
|
815
|
+
$[13] = t8;
|
|
816
|
+
} else {
|
|
817
|
+
t8 = $[13];
|
|
186
818
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
819
|
+
let t9;
|
|
820
|
+
if ($[14] !== theme.primary) {
|
|
821
|
+
t9 = [theme.primary];
|
|
822
|
+
$[14] = theme.primary;
|
|
823
|
+
$[15] = t9;
|
|
824
|
+
} else {
|
|
825
|
+
t9 = $[15];
|
|
826
|
+
}
|
|
827
|
+
let t10;
|
|
828
|
+
if ($[16] !== handleRefresh || $[17] !== showRefreshing || $[18] !== t9) {
|
|
829
|
+
t10 = _jsx(RefreshControl, {
|
|
830
|
+
colors: t9,
|
|
831
|
+
onRefresh: handleRefresh,
|
|
832
|
+
refreshing: showRefreshing
|
|
833
|
+
});
|
|
834
|
+
$[16] = handleRefresh;
|
|
835
|
+
$[17] = showRefreshing;
|
|
836
|
+
$[18] = t9;
|
|
837
|
+
$[19] = t10;
|
|
838
|
+
} else {
|
|
839
|
+
t10 = $[19];
|
|
840
|
+
}
|
|
841
|
+
let t11;
|
|
842
|
+
if ($[20] !== theme.bg.page) {
|
|
843
|
+
t11 = {
|
|
844
|
+
backgroundColor: theme.bg.page
|
|
845
|
+
};
|
|
846
|
+
$[20] = theme.bg.page;
|
|
847
|
+
$[21] = t11;
|
|
848
|
+
} else {
|
|
849
|
+
t11 = $[21];
|
|
850
|
+
}
|
|
851
|
+
let t12;
|
|
852
|
+
if ($[22] !== errorMessage || $[23] !== onBack || $[24] !== onRetry) {
|
|
853
|
+
t12 = _jsx(Feedback.Error, {
|
|
854
|
+
message: errorMessage,
|
|
855
|
+
onBack: onBack,
|
|
856
|
+
onRetry: onRetry
|
|
857
|
+
});
|
|
858
|
+
$[22] = errorMessage;
|
|
859
|
+
$[23] = onBack;
|
|
860
|
+
$[24] = onRetry;
|
|
861
|
+
$[25] = t12;
|
|
862
|
+
} else {
|
|
863
|
+
t12 = $[25];
|
|
864
|
+
}
|
|
865
|
+
let t13;
|
|
866
|
+
if ($[26] !== keyboardDismissMode || $[27] !== keyboardShouldPersistTaps || $[28] !== t10 || $[29] !== t11 || $[30] !== t12 || $[31] !== t8 || $[32] !== testID) {
|
|
867
|
+
t13 = _jsx(ScrollView, {
|
|
868
|
+
contentContainerStyle: t8,
|
|
869
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
870
|
+
keyboardShouldPersistTaps: keyboardShouldPersistTaps,
|
|
871
|
+
refreshControl: t10,
|
|
872
|
+
style: t11,
|
|
873
|
+
testID: testID,
|
|
874
|
+
children: t12
|
|
875
|
+
});
|
|
876
|
+
$[26] = keyboardDismissMode;
|
|
877
|
+
$[27] = keyboardShouldPersistTaps;
|
|
878
|
+
$[28] = t10;
|
|
879
|
+
$[29] = t11;
|
|
880
|
+
$[30] = t12;
|
|
881
|
+
$[31] = t8;
|
|
882
|
+
$[32] = testID;
|
|
883
|
+
$[33] = t13;
|
|
884
|
+
} else {
|
|
885
|
+
t13 = $[33];
|
|
886
|
+
}
|
|
887
|
+
return t13;
|
|
888
|
+
}
|
|
889
|
+
if (items.length === 0) {
|
|
890
|
+
let t7;
|
|
891
|
+
if ($[34] !== bottomInset) {
|
|
892
|
+
t7 = {
|
|
893
|
+
flexGrow: 1,
|
|
894
|
+
justifyContent: "center",
|
|
895
|
+
alignItems: "center",
|
|
896
|
+
paddingBottom: bottomInset
|
|
897
|
+
};
|
|
898
|
+
$[34] = bottomInset;
|
|
899
|
+
$[35] = t7;
|
|
900
|
+
} else {
|
|
901
|
+
t7 = $[35];
|
|
193
902
|
}
|
|
194
|
-
|
|
903
|
+
let t8;
|
|
904
|
+
if ($[36] !== contentContainerStyle || $[37] !== t7) {
|
|
905
|
+
t8 = [t7, contentContainerStyle];
|
|
906
|
+
$[36] = contentContainerStyle;
|
|
907
|
+
$[37] = t7;
|
|
908
|
+
$[38] = t8;
|
|
909
|
+
} else {
|
|
910
|
+
t8 = $[38];
|
|
911
|
+
}
|
|
912
|
+
let t9;
|
|
913
|
+
if ($[39] !== theme.primary) {
|
|
914
|
+
t9 = [theme.primary];
|
|
915
|
+
$[39] = theme.primary;
|
|
916
|
+
$[40] = t9;
|
|
917
|
+
} else {
|
|
918
|
+
t9 = $[40];
|
|
919
|
+
}
|
|
920
|
+
let t10;
|
|
921
|
+
if ($[41] !== handleRefresh || $[42] !== showRefreshing || $[43] !== t9) {
|
|
922
|
+
t10 = _jsx(RefreshControl, {
|
|
923
|
+
colors: t9,
|
|
924
|
+
onRefresh: handleRefresh,
|
|
925
|
+
refreshing: showRefreshing
|
|
926
|
+
});
|
|
927
|
+
$[41] = handleRefresh;
|
|
928
|
+
$[42] = showRefreshing;
|
|
929
|
+
$[43] = t9;
|
|
930
|
+
$[44] = t10;
|
|
931
|
+
} else {
|
|
932
|
+
t10 = $[44];
|
|
933
|
+
}
|
|
934
|
+
let t11;
|
|
935
|
+
if ($[45] !== theme.bg.page) {
|
|
936
|
+
t11 = {
|
|
937
|
+
backgroundColor: theme.bg.page
|
|
938
|
+
};
|
|
939
|
+
$[45] = theme.bg.page;
|
|
940
|
+
$[46] = t11;
|
|
941
|
+
} else {
|
|
942
|
+
t11 = $[46];
|
|
943
|
+
}
|
|
944
|
+
let t12;
|
|
945
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
946
|
+
t12 = _jsx(Feedback.Empty, {});
|
|
947
|
+
$[47] = t12;
|
|
948
|
+
} else {
|
|
949
|
+
t12 = $[47];
|
|
950
|
+
}
|
|
951
|
+
let t13;
|
|
952
|
+
if ($[48] !== keyboardDismissMode || $[49] !== keyboardShouldPersistTaps || $[50] !== t10 || $[51] !== t11 || $[52] !== t8 || $[53] !== testID) {
|
|
953
|
+
t13 = _jsx(ScrollView, {
|
|
954
|
+
contentContainerStyle: t8,
|
|
955
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
956
|
+
keyboardShouldPersistTaps: keyboardShouldPersistTaps,
|
|
957
|
+
refreshControl: t10,
|
|
958
|
+
style: t11,
|
|
959
|
+
testID: testID,
|
|
960
|
+
children: t12
|
|
961
|
+
});
|
|
962
|
+
$[48] = keyboardDismissMode;
|
|
963
|
+
$[49] = keyboardShouldPersistTaps;
|
|
964
|
+
$[50] = t10;
|
|
965
|
+
$[51] = t11;
|
|
966
|
+
$[52] = t8;
|
|
967
|
+
$[53] = testID;
|
|
968
|
+
$[54] = t13;
|
|
969
|
+
} else {
|
|
970
|
+
t13 = $[54];
|
|
971
|
+
}
|
|
972
|
+
return t13;
|
|
973
|
+
}
|
|
974
|
+
let t7;
|
|
975
|
+
if ($[55] !== theme.bg.page) {
|
|
976
|
+
t7 = {
|
|
977
|
+
flex: 1,
|
|
978
|
+
backgroundColor: theme.bg.page
|
|
979
|
+
};
|
|
980
|
+
$[55] = theme.bg.page;
|
|
981
|
+
$[56] = t7;
|
|
982
|
+
} else {
|
|
983
|
+
t7 = $[56];
|
|
984
|
+
}
|
|
985
|
+
const t8 = items.length || 0;
|
|
986
|
+
let t9;
|
|
987
|
+
if ($[57] !== name || $[58] !== t8) {
|
|
988
|
+
t9 = _jsx(Display.CountRecords, {
|
|
989
|
+
count: t8,
|
|
990
|
+
name: name
|
|
991
|
+
});
|
|
992
|
+
$[57] = name;
|
|
993
|
+
$[58] = t8;
|
|
994
|
+
$[59] = t9;
|
|
995
|
+
} else {
|
|
996
|
+
t9 = $[59];
|
|
997
|
+
}
|
|
998
|
+
let t10;
|
|
999
|
+
if ($[60] !== children || $[61] !== contentContainerStyle || $[62] !== keyboardDismissMode || $[63] !== keyboardShouldPersistTaps || $[64] !== testID || $[65] !== tuning || $[66] !== withMargin) {
|
|
1000
|
+
t10 = _jsx(ContentList, {
|
|
1001
|
+
contentContainerStyle: contentContainerStyle,
|
|
1002
|
+
contentWithMargin: withMargin,
|
|
1003
|
+
engineRef: engineRef,
|
|
1004
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
1005
|
+
keyboardShouldPersistTaps: keyboardShouldPersistTaps,
|
|
1006
|
+
testID: testID,
|
|
1007
|
+
tuning: tuning,
|
|
1008
|
+
children: children
|
|
1009
|
+
});
|
|
1010
|
+
$[60] = children;
|
|
1011
|
+
$[61] = contentContainerStyle;
|
|
1012
|
+
$[62] = keyboardDismissMode;
|
|
1013
|
+
$[63] = keyboardShouldPersistTaps;
|
|
1014
|
+
$[64] = testID;
|
|
1015
|
+
$[65] = tuning;
|
|
1016
|
+
$[66] = withMargin;
|
|
1017
|
+
$[67] = t10;
|
|
1018
|
+
} else {
|
|
1019
|
+
t10 = $[67];
|
|
1020
|
+
}
|
|
1021
|
+
let t11;
|
|
1022
|
+
if ($[68] !== t10 || $[69] !== t7 || $[70] !== t9) {
|
|
1023
|
+
t11 = _jsxs(View, {
|
|
1024
|
+
style: t7,
|
|
1025
|
+
children: [t9, t10]
|
|
1026
|
+
});
|
|
1027
|
+
$[68] = t10;
|
|
1028
|
+
$[69] = t7;
|
|
1029
|
+
$[70] = t9;
|
|
1030
|
+
$[71] = t11;
|
|
1031
|
+
} else {
|
|
1032
|
+
t11 = $[71];
|
|
1033
|
+
}
|
|
1034
|
+
return t11;
|
|
195
1035
|
}
|
|
196
|
-
function
|
|
197
|
-
|
|
1036
|
+
function Footer(t0) {
|
|
1037
|
+
const $ = _c(2);
|
|
1038
|
+
const {
|
|
1039
|
+
children
|
|
1040
|
+
} = t0;
|
|
1041
|
+
const {
|
|
1042
|
+
items
|
|
1043
|
+
} = useListView();
|
|
1044
|
+
if (items.length === 0) {
|
|
1045
|
+
return null;
|
|
1046
|
+
}
|
|
1047
|
+
let t1;
|
|
1048
|
+
if ($[0] !== children) {
|
|
1049
|
+
t1 = _jsx(View, {
|
|
1050
|
+
className: "px-4",
|
|
1051
|
+
children: children
|
|
1052
|
+
});
|
|
1053
|
+
$[0] = children;
|
|
1054
|
+
$[1] = t1;
|
|
1055
|
+
} else {
|
|
1056
|
+
t1 = $[1];
|
|
1057
|
+
}
|
|
1058
|
+
return t1;
|
|
198
1059
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
1060
|
+
function FloatingButton(t0) {
|
|
1061
|
+
const $ = _c(2);
|
|
1062
|
+
const {
|
|
1063
|
+
children
|
|
1064
|
+
} = t0;
|
|
1065
|
+
let t1;
|
|
1066
|
+
if ($[0] !== children) {
|
|
1067
|
+
t1 = _jsx(View, {
|
|
1068
|
+
className: "absolute bottom-[50px] right-6 z-10",
|
|
1069
|
+
children: children
|
|
1070
|
+
});
|
|
1071
|
+
$[0] = children;
|
|
1072
|
+
$[1] = t1;
|
|
1073
|
+
} else {
|
|
1074
|
+
t1 = $[1];
|
|
1075
|
+
}
|
|
1076
|
+
return t1;
|
|
1077
|
+
}
|
|
1078
|
+
function RowRoot(t0) {
|
|
1079
|
+
const $ = _c(13);
|
|
1080
|
+
const {
|
|
1081
|
+
children,
|
|
1082
|
+
onPress,
|
|
1083
|
+
onLongPress,
|
|
1084
|
+
showDivider: t1,
|
|
1085
|
+
style,
|
|
1086
|
+
backgroundColor
|
|
1087
|
+
} = t0;
|
|
1088
|
+
const showDivider = t1 === undefined ? true : t1;
|
|
1089
|
+
const dividerClass = showDivider ? " border-b border-border-default" : "";
|
|
1090
|
+
const t2 = "flex-row items-center py-3 px-4 bg-bg-card" + dividerClass;
|
|
1091
|
+
let t3;
|
|
1092
|
+
if ($[0] !== backgroundColor) {
|
|
1093
|
+
t3 = backgroundColor ? {
|
|
1094
|
+
backgroundColor
|
|
1095
|
+
} : undefined;
|
|
1096
|
+
$[0] = backgroundColor;
|
|
1097
|
+
$[1] = t3;
|
|
1098
|
+
} else {
|
|
1099
|
+
t3 = $[1];
|
|
1100
|
+
}
|
|
1101
|
+
let t4;
|
|
1102
|
+
if ($[2] !== style || $[3] !== t3) {
|
|
1103
|
+
t4 = [t3, style];
|
|
1104
|
+
$[2] = style;
|
|
1105
|
+
$[3] = t3;
|
|
1106
|
+
$[4] = t4;
|
|
1107
|
+
} else {
|
|
1108
|
+
t4 = $[4];
|
|
1109
|
+
}
|
|
1110
|
+
let t5;
|
|
1111
|
+
if ($[5] !== children || $[6] !== t2 || $[7] !== t4) {
|
|
1112
|
+
t5 = _jsx(View, {
|
|
1113
|
+
className: t2,
|
|
1114
|
+
style: t4,
|
|
1115
|
+
children: children
|
|
1116
|
+
});
|
|
1117
|
+
$[5] = children;
|
|
1118
|
+
$[6] = t2;
|
|
1119
|
+
$[7] = t4;
|
|
1120
|
+
$[8] = t5;
|
|
1121
|
+
} else {
|
|
1122
|
+
t5 = $[8];
|
|
1123
|
+
}
|
|
1124
|
+
const content = t5;
|
|
1125
|
+
if (onPress || onLongPress) {
|
|
1126
|
+
let t6;
|
|
1127
|
+
if ($[9] !== content || $[10] !== onLongPress || $[11] !== onPress) {
|
|
1128
|
+
t6 = _jsx(Pressable, {
|
|
1129
|
+
hitSlop: 0,
|
|
1130
|
+
onLongPress: onLongPress,
|
|
1131
|
+
onPress: onPress,
|
|
1132
|
+
children: content
|
|
1133
|
+
});
|
|
1134
|
+
$[9] = content;
|
|
1135
|
+
$[10] = onLongPress;
|
|
1136
|
+
$[11] = onPress;
|
|
1137
|
+
$[12] = t6;
|
|
1138
|
+
} else {
|
|
1139
|
+
t6 = $[12];
|
|
205
1140
|
}
|
|
206
|
-
return
|
|
1141
|
+
return t6;
|
|
1142
|
+
}
|
|
1143
|
+
return content;
|
|
207
1144
|
}
|
|
208
|
-
function RowAvatar(
|
|
209
|
-
|
|
1145
|
+
function RowAvatar(t0) {
|
|
1146
|
+
const $ = _c(3);
|
|
1147
|
+
const {
|
|
1148
|
+
children,
|
|
1149
|
+
style
|
|
1150
|
+
} = t0;
|
|
1151
|
+
let t1;
|
|
1152
|
+
if ($[0] !== children || $[1] !== style) {
|
|
1153
|
+
t1 = _jsx(View, {
|
|
1154
|
+
className: "mr-3 justify-center items-center",
|
|
1155
|
+
style: style,
|
|
1156
|
+
children: children
|
|
1157
|
+
});
|
|
1158
|
+
$[0] = children;
|
|
1159
|
+
$[1] = style;
|
|
1160
|
+
$[2] = t1;
|
|
1161
|
+
} else {
|
|
1162
|
+
t1 = $[2];
|
|
1163
|
+
}
|
|
1164
|
+
return t1;
|
|
210
1165
|
}
|
|
211
|
-
function RowContent(
|
|
212
|
-
|
|
1166
|
+
function RowContent(t0) {
|
|
1167
|
+
const $ = _c(3);
|
|
1168
|
+
const {
|
|
1169
|
+
children,
|
|
1170
|
+
style
|
|
1171
|
+
} = t0;
|
|
1172
|
+
let t1;
|
|
1173
|
+
if ($[0] !== children || $[1] !== style) {
|
|
1174
|
+
t1 = _jsx(View, {
|
|
1175
|
+
className: "flex-1 gap-0.5",
|
|
1176
|
+
style: style,
|
|
1177
|
+
children: children
|
|
1178
|
+
});
|
|
1179
|
+
$[0] = children;
|
|
1180
|
+
$[1] = style;
|
|
1181
|
+
$[2] = t1;
|
|
1182
|
+
} else {
|
|
1183
|
+
t1 = $[2];
|
|
1184
|
+
}
|
|
1185
|
+
return t1;
|
|
213
1186
|
}
|
|
214
|
-
function RowTitle(
|
|
215
|
-
|
|
1187
|
+
function RowTitle(t0) {
|
|
1188
|
+
const $ = _c(9);
|
|
1189
|
+
const {
|
|
1190
|
+
children,
|
|
1191
|
+
badge,
|
|
1192
|
+
rightComponent,
|
|
1193
|
+
numberOfLines: t1
|
|
1194
|
+
} = t0;
|
|
1195
|
+
const numberOfLines = t1 === undefined ? 1 : t1;
|
|
1196
|
+
let t2;
|
|
1197
|
+
if ($[0] !== children || $[1] !== numberOfLines) {
|
|
1198
|
+
t2 = _jsx(Typography.Text, {
|
|
1199
|
+
className: "flex-1 flex-shrink min-w-0",
|
|
1200
|
+
numberOfLines: numberOfLines,
|
|
1201
|
+
semibold: true,
|
|
1202
|
+
variant: "body",
|
|
1203
|
+
children: children
|
|
1204
|
+
});
|
|
1205
|
+
$[0] = children;
|
|
1206
|
+
$[1] = numberOfLines;
|
|
1207
|
+
$[2] = t2;
|
|
1208
|
+
} else {
|
|
1209
|
+
t2 = $[2];
|
|
1210
|
+
}
|
|
1211
|
+
let t3;
|
|
1212
|
+
if ($[3] !== badge || $[4] !== rightComponent) {
|
|
1213
|
+
t3 = _jsxs(View, {
|
|
1214
|
+
className: "flex-row items-center gap-2",
|
|
1215
|
+
children: [badge, rightComponent]
|
|
1216
|
+
});
|
|
1217
|
+
$[3] = badge;
|
|
1218
|
+
$[4] = rightComponent;
|
|
1219
|
+
$[5] = t3;
|
|
1220
|
+
} else {
|
|
1221
|
+
t3 = $[5];
|
|
1222
|
+
}
|
|
1223
|
+
let t4;
|
|
1224
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
1225
|
+
t4 = _jsxs(View, {
|
|
1226
|
+
className: "flex-row items-center justify-between gap-2",
|
|
1227
|
+
children: [t2, t3]
|
|
1228
|
+
});
|
|
1229
|
+
$[6] = t2;
|
|
1230
|
+
$[7] = t3;
|
|
1231
|
+
$[8] = t4;
|
|
1232
|
+
} else {
|
|
1233
|
+
t4 = $[8];
|
|
1234
|
+
}
|
|
1235
|
+
return t4;
|
|
216
1236
|
}
|
|
217
|
-
function RowSubtitle(
|
|
218
|
-
|
|
1237
|
+
function RowSubtitle(t0) {
|
|
1238
|
+
const $ = _c(5);
|
|
1239
|
+
const {
|
|
1240
|
+
children,
|
|
1241
|
+
className
|
|
1242
|
+
} = t0;
|
|
1243
|
+
let t1;
|
|
1244
|
+
if ($[0] !== className) {
|
|
1245
|
+
t1 = cn("text-text-secondary", className);
|
|
1246
|
+
$[0] = className;
|
|
1247
|
+
$[1] = t1;
|
|
1248
|
+
} else {
|
|
1249
|
+
t1 = $[1];
|
|
1250
|
+
}
|
|
1251
|
+
let t2;
|
|
1252
|
+
if ($[2] !== children || $[3] !== t1) {
|
|
1253
|
+
t2 = _jsx(Typography.Text, {
|
|
1254
|
+
className: t1,
|
|
1255
|
+
variant: "bodySmall",
|
|
1256
|
+
children: children
|
|
1257
|
+
});
|
|
1258
|
+
$[2] = children;
|
|
1259
|
+
$[3] = t1;
|
|
1260
|
+
$[4] = t2;
|
|
1261
|
+
} else {
|
|
1262
|
+
t2 = $[4];
|
|
1263
|
+
}
|
|
1264
|
+
return t2;
|
|
219
1265
|
}
|
|
220
|
-
function RowFooter(
|
|
221
|
-
|
|
222
|
-
|
|
1266
|
+
function RowFooter(t0) {
|
|
1267
|
+
const $ = _c(9);
|
|
1268
|
+
const {
|
|
1269
|
+
left,
|
|
1270
|
+
right,
|
|
1271
|
+
children
|
|
1272
|
+
} = t0;
|
|
1273
|
+
if (children) {
|
|
1274
|
+
let t1;
|
|
1275
|
+
if ($[0] !== children) {
|
|
1276
|
+
t1 = _jsx(View, {
|
|
1277
|
+
className: "mt-1",
|
|
1278
|
+
children: children
|
|
1279
|
+
});
|
|
1280
|
+
$[0] = children;
|
|
1281
|
+
$[1] = t1;
|
|
1282
|
+
} else {
|
|
1283
|
+
t1 = $[1];
|
|
223
1284
|
}
|
|
224
|
-
return
|
|
1285
|
+
return t1;
|
|
1286
|
+
}
|
|
1287
|
+
let t1;
|
|
1288
|
+
if ($[2] !== left) {
|
|
1289
|
+
t1 = _jsx(View, {
|
|
1290
|
+
className: "flex-row items-center gap-2",
|
|
1291
|
+
children: left
|
|
1292
|
+
});
|
|
1293
|
+
$[2] = left;
|
|
1294
|
+
$[3] = t1;
|
|
1295
|
+
} else {
|
|
1296
|
+
t1 = $[3];
|
|
1297
|
+
}
|
|
1298
|
+
let t2;
|
|
1299
|
+
if ($[4] !== right) {
|
|
1300
|
+
t2 = _jsx(View, {
|
|
1301
|
+
className: "flex-row items-center",
|
|
1302
|
+
children: right
|
|
1303
|
+
});
|
|
1304
|
+
$[4] = right;
|
|
1305
|
+
$[5] = t2;
|
|
1306
|
+
} else {
|
|
1307
|
+
t2 = $[5];
|
|
1308
|
+
}
|
|
1309
|
+
let t3;
|
|
1310
|
+
if ($[6] !== t1 || $[7] !== t2) {
|
|
1311
|
+
t3 = _jsxs(View, {
|
|
1312
|
+
className: "flex-row items-center justify-between mt-1",
|
|
1313
|
+
children: [t1, t2]
|
|
1314
|
+
});
|
|
1315
|
+
$[6] = t1;
|
|
1316
|
+
$[7] = t2;
|
|
1317
|
+
$[8] = t3;
|
|
1318
|
+
} else {
|
|
1319
|
+
t3 = $[8];
|
|
1320
|
+
}
|
|
1321
|
+
return t3;
|
|
225
1322
|
}
|
|
226
|
-
function RowActions(
|
|
227
|
-
|
|
1323
|
+
function RowActions(t0) {
|
|
1324
|
+
const $ = _c(3);
|
|
1325
|
+
const {
|
|
1326
|
+
children,
|
|
1327
|
+
style
|
|
1328
|
+
} = t0;
|
|
1329
|
+
let t1;
|
|
1330
|
+
if ($[0] !== children || $[1] !== style) {
|
|
1331
|
+
t1 = _jsx(View, {
|
|
1332
|
+
className: "flex-row items-center gap-1 ml-2",
|
|
1333
|
+
style: style,
|
|
1334
|
+
children: children
|
|
1335
|
+
});
|
|
1336
|
+
$[0] = children;
|
|
1337
|
+
$[1] = style;
|
|
1338
|
+
$[2] = t1;
|
|
1339
|
+
} else {
|
|
1340
|
+
t1 = $[2];
|
|
1341
|
+
}
|
|
1342
|
+
return t1;
|
|
228
1343
|
}
|
|
229
|
-
|
|
230
|
-
|
|
1344
|
+
/** Grows the target to 48 points tall; sideways it stops at half the gap between actions. */
|
|
1345
|
+
const ROW_ACTION_SLOP = {
|
|
1346
|
+
top: 8,
|
|
1347
|
+
bottom: 8,
|
|
1348
|
+
left: 2,
|
|
1349
|
+
right: 2
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/** Compact icon action inside a row. */
|
|
1353
|
+
function RowActionButton(t0) {
|
|
1354
|
+
const $ = _c(5);
|
|
1355
|
+
const {
|
|
1356
|
+
icon,
|
|
1357
|
+
onPress,
|
|
1358
|
+
accessibilityLabel,
|
|
1359
|
+
testID
|
|
1360
|
+
} = t0;
|
|
1361
|
+
let t1;
|
|
1362
|
+
if ($[0] !== accessibilityLabel || $[1] !== icon || $[2] !== onPress || $[3] !== testID) {
|
|
1363
|
+
t1 = _jsx(Pressable, {
|
|
1364
|
+
accessibilityLabel: accessibilityLabel,
|
|
1365
|
+
className: "p-1.5 rounded",
|
|
1366
|
+
hitSlop: ROW_ACTION_SLOP,
|
|
1367
|
+
onPress: onPress,
|
|
1368
|
+
testID: testID,
|
|
1369
|
+
children: icon
|
|
1370
|
+
});
|
|
1371
|
+
$[0] = accessibilityLabel;
|
|
1372
|
+
$[1] = icon;
|
|
1373
|
+
$[2] = onPress;
|
|
1374
|
+
$[3] = testID;
|
|
1375
|
+
$[4] = t1;
|
|
1376
|
+
} else {
|
|
1377
|
+
t1 = $[4];
|
|
1378
|
+
}
|
|
1379
|
+
return t1;
|
|
231
1380
|
}
|
|
232
1381
|
const FiltersWithSubComponents = Object.assign(HeaderFilters, {
|
|
233
|
-
|
|
234
|
-
|
|
1382
|
+
Chip: FilterChip,
|
|
1383
|
+
Chips: FilterChips
|
|
235
1384
|
});
|
|
236
1385
|
const HeaderWithSubComponents = Object.assign(Header, {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
1386
|
+
Search: HeaderSearch,
|
|
1387
|
+
SearchHistory: HeaderSearchHistory,
|
|
1388
|
+
Segmented: HeaderSegmented,
|
|
1389
|
+
Actions: HeaderActions,
|
|
1390
|
+
ActionsBar: HeaderActionsBar,
|
|
1391
|
+
Filters: FiltersWithSubComponents
|
|
243
1392
|
});
|
|
244
1393
|
const RowWithSubComponents = Object.assign(RowRoot, {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
1394
|
+
Avatar: RowAvatar,
|
|
1395
|
+
Content: RowContent,
|
|
1396
|
+
Title: RowTitle,
|
|
1397
|
+
Subtitle: RowSubtitle,
|
|
1398
|
+
Footer: RowFooter,
|
|
1399
|
+
Actions: RowActions,
|
|
1400
|
+
ActionButton: RowActionButton
|
|
252
1401
|
});
|
|
253
1402
|
const ContentWithSubComponents = Object.assign(Content, {
|
|
254
|
-
|
|
255
|
-
Row: RowWithSubComponents,
|
|
1403
|
+
Row: RowWithSubComponents
|
|
256
1404
|
});
|
|
1405
|
+
|
|
257
1406
|
/**
|
|
258
1407
|
* Screen container for a collection (list / index / search results).
|
|
259
1408
|
* Owns safe-area, the FlashList (pagination + pull-to-refresh), record count, and the
|
|
@@ -267,16 +1416,17 @@ const ContentWithSubComponents = Object.assign(Content, {
|
|
|
267
1416
|
* .Header.Segmented — tab-like switch in the subheader (Activos / Archivados)
|
|
268
1417
|
* .Header.Filters(.Chips/.Chip) — horizontal filter pills (SIBLING below the header)
|
|
269
1418
|
* .Header.ActionsBar — SIBLING bar below the header (bulk select, etc.)
|
|
270
|
-
* ListViewV2.Content —
|
|
1419
|
+
* ListViewV2.Content — virtualized body; `children` is an optional custom row renderer,
|
|
1420
|
+
* `tuning` the recycling options, `ref` a `ListViewHandle`
|
|
271
1421
|
* .Content.Row(.Avatar/.Content/.Title/.Subtitle/.Footer/.Actions/.ActionButton)
|
|
272
1422
|
* ListViewV2.Footer — pinned footer (hidden when empty)
|
|
273
1423
|
* ListViewV2.FloatingButton — absolute FAB overlay
|
|
274
1424
|
*/
|
|
275
1425
|
export const ListViewV2 = {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
1426
|
+
Root: ListViewRoot,
|
|
1427
|
+
Header: HeaderWithSubComponents,
|
|
1428
|
+
Content: ContentWithSubComponents,
|
|
1429
|
+
Footer,
|
|
1430
|
+
FloatingButton
|
|
281
1431
|
};
|
|
282
1432
|
export default ListViewV2;
|