react-native-stallion 2.4.2-alpha.1 → 2.4.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/main/components/StallionDevMenu.js +69 -0
- package/src/main/components/StallionDevMenu.js.map +1 -0
- package/src/main/components/common/BackButton/index.js +19 -42
- package/src/main/components/common/BackButton/index.js.map +1 -1
- package/src/main/components/common/Chevron/index.js +64 -0
- package/src/main/components/common/Chevron/index.js.map +1 -0
- package/src/main/components/common/CrossButton/index.js +18 -11
- package/src/main/components/common/CrossButton/index.js.map +1 -1
- package/src/main/components/common/Header/index.js +3 -15
- package/src/main/components/common/Header/index.js.map +1 -1
- package/src/main/components/common/Header/styles.js +0 -22
- package/src/main/components/common/Header/styles.js.map +1 -1
- package/src/main/components/modules/devMenu/components/ActionButton.js +45 -0
- package/src/main/components/modules/devMenu/components/ActionButton.js.map +1 -0
- package/src/main/components/modules/devMenu/components/AppHeader.js +17 -0
- package/src/main/components/modules/devMenu/components/AppHeader.js.map +1 -0
- package/src/main/components/modules/devMenu/components/BucketRow.js +34 -0
- package/src/main/components/modules/devMenu/components/BucketRow.js.map +1 -0
- package/src/main/components/modules/devMenu/components/BundleHistoryCard.js +92 -0
- package/src/main/components/modules/devMenu/components/BundleHistoryCard.js.map +1 -0
- package/src/main/components/modules/devMenu/components/Chip.js +16 -0
- package/src/main/components/modules/devMenu/components/Chip.js.map +1 -0
- package/src/main/components/modules/devMenu/components/DetailHeader.js +32 -0
- package/src/main/components/modules/devMenu/components/DetailHeader.js.map +1 -0
- package/src/main/components/modules/devMenu/components/DeviceCard.js +31 -0
- package/src/main/components/modules/devMenu/components/DeviceCard.js.map +1 -0
- package/src/main/components/modules/devMenu/components/ErrorBanner.js +17 -0
- package/src/main/components/modules/devMenu/components/ErrorBanner.js.map +1 -0
- package/src/main/components/modules/devMenu/components/ModeToggle.js +54 -0
- package/src/main/components/modules/devMenu/components/ModeToggle.js.map +1 -0
- package/src/main/components/modules/devMenu/components/ProdBundleCard.js +47 -0
- package/src/main/components/modules/devMenu/components/ProdBundleCard.js.map +1 -0
- package/src/main/components/modules/devMenu/components/ReleaseNote.js +44 -0
- package/src/main/components/modules/devMenu/components/ReleaseNote.js.map +1 -0
- package/src/main/components/modules/devMenu/components/SectionLabel.js +13 -0
- package/src/main/components/modules/devMenu/components/SectionLabel.js.map +1 -0
- package/src/main/components/modules/devMenu/components/StateCard.js +30 -0
- package/src/main/components/modules/devMenu/components/StateCard.js.map +1 -0
- package/src/main/components/modules/devMenu/components/Wordmark.js +35 -0
- package/src/main/components/modules/devMenu/components/Wordmark.js.map +1 -0
- package/src/main/components/modules/devMenu/components/styles/index.js +403 -0
- package/src/main/components/modules/devMenu/components/styles/index.js.map +1 -0
- package/src/main/components/modules/devMenu/index.js +47 -0
- package/src/main/components/modules/devMenu/index.js.map +1 -0
- package/src/main/components/modules/devMenu/screens/BundleHistory.js +142 -0
- package/src/main/components/modules/devMenu/screens/BundleHistory.js.map +1 -0
- package/src/main/components/modules/devMenu/screens/Production.js +65 -0
- package/src/main/components/modules/devMenu/screens/Production.js.map +1 -0
- package/src/main/components/modules/devMenu/screens/TestingBuckets.js +81 -0
- package/src/main/components/modules/devMenu/screens/TestingBuckets.js.map +1 -0
- package/src/main/components/modules/devMenu/styles.js +50 -0
- package/src/main/components/modules/devMenu/styles.js.map +1 -0
- package/src/main/components/modules/modal/StallionModal.js +15 -51
- package/src/main/components/modules/modal/StallionModal.js.map +1 -1
- package/src/main/components/modules/modal/hooks/useStallionModal.js +21 -19
- package/src/main/components/modules/modal/hooks/useStallionModal.js.map +1 -1
- package/src/main/constants/appConstants.js +56 -53
- package/src/main/constants/appConstants.js.map +1 -1
- package/src/main/constants/colors.js +1 -10
- package/src/main/constants/colors.js.map +1 -1
- package/src/main/constants/designTokens.js +80 -0
- package/src/main/constants/designTokens.js.map +1 -0
- package/src/main/index.js +3 -1
- package/src/main/index.js.map +1 -1
- package/src/main/utils/useStallionConfig.js +2 -2
- package/src/main/utils/useStallionConfig.js.map +1 -1
- package/src/types/bundle.types.js +7 -0
- package/src/types/bundle.types.js.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/main/components/StallionDevMenu.d.ts +5 -0
- package/types/main/components/StallionDevMenu.d.ts.map +1 -0
- package/types/main/components/common/BackButton/index.d.ts +4 -3
- package/types/main/components/common/BackButton/index.d.ts.map +1 -1
- package/types/main/components/common/Chevron/index.d.ts +11 -0
- package/types/main/components/common/Chevron/index.d.ts.map +1 -0
- package/types/main/components/common/CrossButton/index.d.ts +4 -3
- package/types/main/components/common/CrossButton/index.d.ts.map +1 -1
- package/types/main/components/common/Header/index.d.ts +0 -2
- package/types/main/components/common/Header/index.d.ts.map +1 -1
- package/types/main/components/common/Header/styles.d.ts +0 -21
- package/types/main/components/common/Header/styles.d.ts.map +1 -1
- package/types/main/components/modules/devMenu/components/ActionButton.d.ts +19 -0
- package/types/main/components/modules/devMenu/components/ActionButton.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/AppHeader.d.ts +7 -0
- package/types/main/components/modules/devMenu/components/AppHeader.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/BucketRow.d.ts +11 -0
- package/types/main/components/modules/devMenu/components/BucketRow.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/BundleHistoryCard.d.ts +22 -0
- package/types/main/components/modules/devMenu/components/BundleHistoryCard.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/Chip.d.ts +9 -0
- package/types/main/components/modules/devMenu/components/Chip.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/DetailHeader.d.ts +10 -0
- package/types/main/components/modules/devMenu/components/DetailHeader.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/DeviceCard.d.ts +8 -0
- package/types/main/components/modules/devMenu/components/DeviceCard.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/ErrorBanner.d.ts +6 -0
- package/types/main/components/modules/devMenu/components/ErrorBanner.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/ModeToggle.d.ts +8 -0
- package/types/main/components/modules/devMenu/components/ModeToggle.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/ProdBundleCard.d.ts +13 -0
- package/types/main/components/modules/devMenu/components/ProdBundleCard.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/ReleaseNote.d.ts +11 -0
- package/types/main/components/modules/devMenu/components/ReleaseNote.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/SectionLabel.d.ts +6 -0
- package/types/main/components/modules/devMenu/components/SectionLabel.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/StateCard.d.ts +9 -0
- package/types/main/components/modules/devMenu/components/StateCard.d.ts.map +1 -0
- package/types/main/components/modules/{listing/index.d.ts → devMenu/components/Wordmark.d.ts} +1 -1
- package/types/main/components/modules/devMenu/components/Wordmark.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/components/styles/index.d.ts +353 -0
- package/types/main/components/modules/devMenu/components/styles/index.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/index.d.ts +14 -0
- package/types/main/components/modules/devMenu/index.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/screens/BundleHistory.d.ts +4 -0
- package/types/main/components/modules/devMenu/screens/BundleHistory.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/screens/Production.d.ts +4 -0
- package/types/main/components/modules/devMenu/screens/Production.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/screens/TestingBuckets.d.ts +4 -0
- package/types/main/components/modules/devMenu/screens/TestingBuckets.d.ts.map +1 -0
- package/types/main/components/modules/devMenu/styles.d.ts +46 -0
- package/types/main/components/modules/devMenu/styles.d.ts.map +1 -0
- package/types/main/components/modules/modal/StallionModal.d.ts.map +1 -1
- package/types/main/components/modules/modal/hooks/useStallionModal.d.ts +5 -6
- package/types/main/components/modules/modal/hooks/useStallionModal.d.ts.map +1 -1
- package/types/main/constants/appConstants.d.ts +46 -48
- package/types/main/constants/appConstants.d.ts.map +1 -1
- package/types/main/constants/colors.d.ts +0 -9
- package/types/main/constants/colors.d.ts.map +1 -1
- package/types/main/constants/designTokens.d.ts +73 -0
- package/types/main/constants/designTokens.d.ts.map +1 -0
- package/types/main/index.d.ts +1 -0
- package/types/main/index.d.ts.map +1 -1
- package/types/main/utils/useStallionConfig.d.ts.map +1 -1
- package/types/types/bundle.types.d.ts +7 -0
- package/types/types/bundle.types.d.ts.map +1 -1
- package/types/types/utils.types.d.ts +3 -0
- package/types/types/utils.types.d.ts.map +1 -1
- package/src/main/components/common/ErrorView/index.js +0 -24
- package/src/main/components/common/ErrorView/index.js.map +0 -1
- package/src/main/components/common/ErrorView/styles.js +0 -30
- package/src/main/components/common/ErrorView/styles.js.map +0 -1
- package/src/main/components/common/Footer/index.js +0 -50
- package/src/main/components/common/Footer/index.js.map +0 -1
- package/src/main/components/common/Footer/styles.js +0 -91
- package/src/main/components/common/Footer/styles.js.map +0 -1
- package/src/main/components/common/FooterLoader/index.js +0 -11
- package/src/main/components/common/FooterLoader/index.js.map +0 -1
- package/src/main/components/common/FooterLoader/styles.js +0 -12
- package/src/main/components/common/FooterLoader/styles.js.map +0 -1
- package/src/main/components/common/OverlayLoader/index.js +0 -26
- package/src/main/components/common/OverlayLoader/index.js.map +0 -1
- package/src/main/components/common/OverlayLoader/styles.js +0 -33
- package/src/main/components/common/OverlayLoader/styles.js.map +0 -1
- package/src/main/components/modules/listing/components/BucketCard.js +0 -33
- package/src/main/components/modules/listing/components/BucketCard.js.map +0 -1
- package/src/main/components/modules/listing/components/BucketCardInfoSection.js +0 -56
- package/src/main/components/modules/listing/components/BucketCardInfoSection.js.map +0 -1
- package/src/main/components/modules/listing/components/BundleCard.js +0 -42
- package/src/main/components/modules/listing/components/BundleCard.js.map +0 -1
- package/src/main/components/modules/listing/components/BundleCardInfoSection.js +0 -82
- package/src/main/components/modules/listing/components/BundleCardInfoSection.js.map +0 -1
- package/src/main/components/modules/listing/components/CardDescriptionContent.js +0 -36
- package/src/main/components/modules/listing/components/CardDescriptionContent.js.map +0 -1
- package/src/main/components/modules/listing/components/ConfigView.js +0 -29
- package/src/main/components/modules/listing/components/ConfigView.js.map +0 -1
- package/src/main/components/modules/listing/components/MetaCard.js +0 -39
- package/src/main/components/modules/listing/components/MetaCard.js.map +0 -1
- package/src/main/components/modules/listing/components/SlotView.js +0 -80
- package/src/main/components/modules/listing/components/SlotView.js.map +0 -1
- package/src/main/components/modules/listing/components/styles/index.js +0 -121
- package/src/main/components/modules/listing/components/styles/index.js.map +0 -1
- package/src/main/components/modules/listing/hooks/useListing.js +0 -84
- package/src/main/components/modules/listing/hooks/useListing.js.map +0 -1
- package/src/main/components/modules/listing/index.js +0 -75
- package/src/main/components/modules/listing/index.js.map +0 -1
- package/src/main/components/modules/listing/styles.js +0 -24
- package/src/main/components/modules/listing/styles.js.map +0 -1
- package/src/main/components/modules/prod/index.js +0 -3
- package/src/main/components/modules/prod/index.js.map +0 -1
- package/src/main/components/modules/prod/prod.js +0 -30
- package/src/main/components/modules/prod/prod.js.map +0 -1
- package/src/main/components/modules/prod/styles/index.js +0 -29
- package/src/main/components/modules/prod/styles/index.js.map +0 -1
- package/types/main/components/common/ErrorView/index.d.ts +0 -8
- package/types/main/components/common/ErrorView/index.d.ts.map +0 -1
- package/types/main/components/common/ErrorView/styles.d.ts +0 -27
- package/types/main/components/common/ErrorView/styles.d.ts.map +0 -1
- package/types/main/components/common/Footer/index.d.ts +0 -10
- package/types/main/components/common/Footer/index.d.ts.map +0 -1
- package/types/main/components/common/Footer/styles.d.ts +0 -88
- package/types/main/components/common/Footer/styles.d.ts.map +0 -1
- package/types/main/components/common/FooterLoader/index.d.ts +0 -4
- package/types/main/components/common/FooterLoader/index.d.ts.map +0 -1
- package/types/main/components/common/FooterLoader/styles.d.ts +0 -10
- package/types/main/components/common/FooterLoader/styles.d.ts.map +0 -1
- package/types/main/components/common/OverlayLoader/index.d.ts +0 -7
- package/types/main/components/common/OverlayLoader/index.d.ts.map +0 -1
- package/types/main/components/common/OverlayLoader/styles.d.ts +0 -30
- package/types/main/components/common/OverlayLoader/styles.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/BucketCard.d.ts +0 -13
- package/types/main/components/modules/listing/components/BucketCard.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts +0 -11
- package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/BundleCard.d.ts +0 -15
- package/types/main/components/modules/listing/components/BundleCard.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts +0 -15
- package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts +0 -8
- package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/ConfigView.d.ts +0 -8
- package/types/main/components/modules/listing/components/ConfigView.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/MetaCard.d.ts +0 -8
- package/types/main/components/modules/listing/components/MetaCard.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/SlotView.d.ts +0 -5
- package/types/main/components/modules/listing/components/SlotView.d.ts.map +0 -1
- package/types/main/components/modules/listing/components/styles/index.d.ts +0 -118
- package/types/main/components/modules/listing/components/styles/index.d.ts.map +0 -1
- package/types/main/components/modules/listing/hooks/useListing.d.ts +0 -15
- package/types/main/components/modules/listing/hooks/useListing.d.ts.map +0 -1
- package/types/main/components/modules/listing/index.d.ts.map +0 -1
- package/types/main/components/modules/listing/styles.d.ts +0 -21
- package/types/main/components/modules/listing/styles.d.ts.map +0 -1
- package/types/main/components/modules/prod/index.d.ts +0 -3
- package/types/main/components/modules/prod/index.d.ts.map +0 -1
- package/types/main/components/modules/prod/prod.d.ts +0 -4
- package/types/main/components/modules/prod/prod.d.ts.map +0 -1
- package/types/main/components/modules/prod/styles/index.d.ts +0 -25
- package/types/main/components/modules/prod/styles/index.d.ts.map +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useContext, useMemo, memo } from 'react';
|
|
2
|
-
import { Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import { GlobalContext } from '../../../../state';
|
|
4
|
-
import CardDescriptionContent from './CardDescriptionContent';
|
|
5
|
-
import { parseDateTime } from '../../../../utils/dateUtil';
|
|
6
|
-
import { APPLIED_TEXT, BUCKET_CARD_TEXTS, BUNDLE_APPLIED_TEXT, BUNDLE_CARD_AUTHOR, BUNDLE_CARD_RELEASE_NOTE, DOWNLOADED_TEXT, DOWNLOAD_BUTTON_TEXT, NO_RELEASE_NOTE_TEXT, SWITCH_STATE_KEYS } from '../../../../constants/appConstants';
|
|
7
|
-
import { COLORS } from '../../../../constants/colors';
|
|
8
|
-
import styles from './styles';
|
|
9
|
-
const BundleCardInfoSection = _ref => {
|
|
10
|
-
let {
|
|
11
|
-
id,
|
|
12
|
-
version,
|
|
13
|
-
description,
|
|
14
|
-
updatedAt,
|
|
15
|
-
author,
|
|
16
|
-
isApplied,
|
|
17
|
-
isDownloaded,
|
|
18
|
-
downloadUrl
|
|
19
|
-
} = _ref;
|
|
20
|
-
const {
|
|
21
|
-
bundleState: {
|
|
22
|
-
selectedBucketId
|
|
23
|
-
},
|
|
24
|
-
actions: {
|
|
25
|
-
downloadBundle
|
|
26
|
-
}
|
|
27
|
-
} = useContext(GlobalContext);
|
|
28
|
-
const stateColor = useMemo(() => {
|
|
29
|
-
if (isApplied) return COLORS.indigo;
|
|
30
|
-
if (isDownloaded) return COLORS.green;
|
|
31
|
-
return COLORS.white;
|
|
32
|
-
}, [isApplied, isDownloaded]);
|
|
33
|
-
const updatedAtText = useMemo(() => {
|
|
34
|
-
return parseDateTime(updatedAt);
|
|
35
|
-
}, [updatedAt]);
|
|
36
|
-
const handleDownloadPress = useCallback(() => {
|
|
37
|
-
if (!isApplied && selectedBucketId && version) {
|
|
38
|
-
downloadBundle(downloadUrl, id);
|
|
39
|
-
}
|
|
40
|
-
}, [isApplied, selectedBucketId, version, downloadBundle, downloadUrl, id]);
|
|
41
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
42
|
-
style: styles.container
|
|
43
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
44
|
-
style: styles.rowContainer
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
46
|
-
style: [styles.titleText, styles.bold]
|
|
47
|
-
}, "v", version), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
48
|
-
onPress: handleDownloadPress,
|
|
49
|
-
disabled: isApplied || isDownloaded,
|
|
50
|
-
style: [styles.downloadButton, {
|
|
51
|
-
backgroundColor: isApplied || isDownloaded ? 'transparent' : COLORS.black
|
|
52
|
-
}]
|
|
53
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
54
|
-
style: [styles.appliedText, {
|
|
55
|
-
color: stateColor
|
|
56
|
-
}]
|
|
57
|
-
}, isApplied ? APPLIED_TEXT : isDownloaded ? DOWNLOADED_TEXT : DOWNLOAD_BUTTON_TEXT))), description ? /*#__PURE__*/React.createElement(View, {
|
|
58
|
-
style: styles.descContainer
|
|
59
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
60
|
-
style: styles.releaseNoteText
|
|
61
|
-
}, BUNDLE_CARD_RELEASE_NOTE), /*#__PURE__*/React.createElement(Text, {
|
|
62
|
-
numberOfLines: 2,
|
|
63
|
-
style: styles.releaseNoteDescriptionText
|
|
64
|
-
}, description)) : /*#__PURE__*/React.createElement(Text, {
|
|
65
|
-
style: styles.releaseNoteText
|
|
66
|
-
}, NO_RELEASE_NOTE_TEXT), /*#__PURE__*/React.createElement(View, {
|
|
67
|
-
style: styles.divider
|
|
68
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
69
|
-
style: styles.rowContainer
|
|
70
|
-
}, /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
71
|
-
title: BUNDLE_CARD_AUTHOR,
|
|
72
|
-
subtitle: author ?? ''
|
|
73
|
-
}), /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
74
|
-
title: BUNDLE_APPLIED_TEXT,
|
|
75
|
-
subtitle: isApplied ? SWITCH_STATE_KEYS.Enabled : SWITCH_STATE_KEYS.Disabled
|
|
76
|
-
}), /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
77
|
-
title: BUCKET_CARD_TEXTS.UPDATED,
|
|
78
|
-
subtitle: updatedAtText
|
|
79
|
-
})));
|
|
80
|
-
};
|
|
81
|
-
export default /*#__PURE__*/memo(BundleCardInfoSection);
|
|
82
|
-
//# sourceMappingURL=BundleCardInfoSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useContext","useMemo","memo","Text","TouchableOpacity","View","GlobalContext","CardDescriptionContent","parseDateTime","APPLIED_TEXT","BUCKET_CARD_TEXTS","BUNDLE_APPLIED_TEXT","BUNDLE_CARD_AUTHOR","BUNDLE_CARD_RELEASE_NOTE","DOWNLOADED_TEXT","DOWNLOAD_BUTTON_TEXT","NO_RELEASE_NOTE_TEXT","SWITCH_STATE_KEYS","COLORS","styles","BundleCardInfoSection","_ref","id","version","description","updatedAt","author","isApplied","isDownloaded","downloadUrl","bundleState","selectedBucketId","actions","downloadBundle","stateColor","indigo","green","white","updatedAtText","handleDownloadPress","createElement","style","container","rowContainer","titleText","bold","onPress","disabled","downloadButton","backgroundColor","black","appliedText","color","descContainer","releaseNoteText","numberOfLines","releaseNoteDescriptionText","divider","title","subtitle","Enabled","Disabled","UPDATED"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/BundleCardInfoSection.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,EAAEC,OAAO,EAAEC,IAAI,QAAQ,OAAO;AACrE,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ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ACsC,KAAK,EAAEtB,MAAM,CAACmC;EAAgB,GAAEtC,oBAA2B,CAClE,eACDlB,KAAA,CAAA0C,aAAA,CAACnC,IAAI;IAACoC,KAAK,EAAEtB,MAAM,CAACsC;EAAQ,CAAE,CAAC,eAC/B3D,KAAA,CAAA0C,aAAA,CAACnC,IAAI;IAACoC,KAAK,EAAEtB,MAAM,CAACwB;EAAa,gBAC/B7C,KAAA,CAAA0C,aAAA,CAACjC,sBAAsB;IACrBmD,KAAK,EAAE9C,kBAAmB;IAC1B+C,QAAQ,EAAEjC,MAAM,IAAI;EAAG,CACxB,CAAC,eACF5B,KAAA,CAAA0C,aAAA,CAACjC,sBAAsB;IACrBmD,KAAK,EAAE/C,mBAAoB;IAC3BgD,QAAQ,EACNhC,SAAS,GAAGV,iBAAiB,CAAC2C,OAAO,GAAG3C,iBAAiB,CAAC4C;EAC3D,CACF,CAAC,eACF/D,KAAA,CAAA0C,aAAA,CAACjC,sBAAsB;IACrBmD,KAAK,EAAEhD,iBAAiB,CAACoD,OAAQ;IACjCH,QAAQ,EAAErB;EAAc,CACzB,CACG,CACF,CAAC;AAEX,CAAC;AAED,4BAAepC,IAAI,CAACkB,qBAAqB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { StyleSheet, Text, View } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { COLORS } from '../../../../constants/colors';
|
|
4
|
-
import { STD_MARGIN } from '../../../../constants/appConstants';
|
|
5
|
-
const CardDescriptionContent = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
title,
|
|
8
|
-
subtitle
|
|
9
|
-
} = _ref;
|
|
10
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
11
|
-
style: styles.centerContainer
|
|
12
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
13
|
-
style: styles.title
|
|
14
|
-
}, title), /*#__PURE__*/React.createElement(Text, {
|
|
15
|
-
style: styles.subtitle
|
|
16
|
-
}, subtitle));
|
|
17
|
-
};
|
|
18
|
-
const styles = StyleSheet.create({
|
|
19
|
-
centerContainer: {
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
alignItems: 'center'
|
|
22
|
-
},
|
|
23
|
-
title: {
|
|
24
|
-
fontSize: STD_MARGIN * 1.3,
|
|
25
|
-
fontWeight: '500',
|
|
26
|
-
color: COLORS.black7
|
|
27
|
-
},
|
|
28
|
-
subtitle: {
|
|
29
|
-
fontSize: STD_MARGIN * 1.1,
|
|
30
|
-
fontWeight: '600',
|
|
31
|
-
marginTop: 5,
|
|
32
|
-
color: COLORS.black
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export default CardDescriptionContent;
|
|
36
|
-
//# sourceMappingURL=CardDescriptionContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","View","React","COLORS","STD_MARGIN","CardDescriptionContent","_ref","title","subtitle","createElement","style","styles","centerContainer","create","justifyContent","alignItems","fontSize","fontWeight","color","black7","marginTop","black"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/CardDescriptionContent.tsx"],"mappings":"AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SAASC,UAAU,QAAQ,oCAAoC;AAM/D,MAAMC,sBAAyD,GAAGC,IAAA,IAG5D;EAAA,IAH6D;IACjEC,KAAK;IACLC;EACF,CAAC,GAAAF,IAAA;EACC,oBACEJ,KAAA,CAAAO,aAAA,CAACR,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACC;EAAgB,gBAClCV,KAAA,CAAAO,aAAA,CAACT,IAAI;IAACU,KAAK,EAAEC,MAAM,CAACJ;EAAM,GAAEA,KAAY,CAAC,eACzCL,KAAA,CAAAO,aAAA,CAACT,IAAI;IAACU,KAAK,EAAEC,MAAM,CAACH;EAAS,GAAEA,QAAe,CAC1C,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGZ,UAAU,CAACc,MAAM,CAAC;EAC/BD,eAAe,EAAE;IAAEE,cAAc,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAS,CAAC;EACnER,KAAK,EAAE;IACLS,QAAQ,EAAEZ,UAAU,GAAG,GAAG;IAC1Ba,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAEf,MAAM,CAACgB;EAChB,CAAC;EACDX,QAAQ,EAAE;IACRQ,QAAQ,EAAEZ,UAAU,GAAG,GAAG;IAC1Ba,UAAU,EAAE,KAAK;IACjBG,SAAS,EAAE,CAAC;IACZF,KAAK,EAAEf,MAAM,CAACkB;EAChB;AACF,CAAC,CAAC;AAEF,eAAehB,sBAAsB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import styles from './styles';
|
|
4
|
-
const ConfigView = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
config
|
|
7
|
-
} = _ref;
|
|
8
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
9
|
-
style: [styles.metaConainer]
|
|
10
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
11
|
-
style: [styles.configCardContainer]
|
|
12
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
13
|
-
style: [styles.titleText, styles.bold]
|
|
14
|
-
}, "App Version :"), /*#__PURE__*/React.createElement(View, {
|
|
15
|
-
style: [styles.colContainer, styles.flex]
|
|
16
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
17
|
-
style: [styles.subTitleText]
|
|
18
|
-
}, config.appVersion))), /*#__PURE__*/React.createElement(View, {
|
|
19
|
-
style: styles.configCardContainer
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
21
|
-
style: [styles.titleText, styles.bold]
|
|
22
|
-
}, "UID :"), /*#__PURE__*/React.createElement(View, {
|
|
23
|
-
style: [styles.colContainer, styles.flex]
|
|
24
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
25
|
-
style: [styles.subTitleText]
|
|
26
|
-
}, config.uid))));
|
|
27
|
-
};
|
|
28
|
-
export default ConfigView;
|
|
29
|
-
//# sourceMappingURL=ConfigView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","styles","ConfigView","_ref","config","createElement","style","metaConainer","configCardContainer","titleText","bold","colContainer","flex","subTitleText","appVersion","uid"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/ConfigView.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,OAAOC,MAAM,MAAM,UAAU;AAO7B,MAAMC,UAAiC,GAAGC,IAAA,IAAgB;EAAA,IAAf;IAAEC;EAAO,CAAC,GAAAD,IAAA;EACnD,oBACEL,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE,CAACL,MAAM,CAACM,YAAY;EAAE,gBACjCT,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE,CAACL,MAAM,CAACO,mBAAmB;EAAE,gBACxCV,KAAA,CAAAO,aAAA,CAACN,IAAI;IAACO,KAAK,EAAE,CAACL,MAAM,CAACQ,SAAS,EAAER,MAAM,CAACS,IAAI;EAAE,GAAC,eAAmB,CAAC,eAClEZ,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE,CAACL,MAAM,CAACU,YAAY,EAAEV,MAAM,CAACW,IAAI;EAAE,gBAC9Cd,KAAA,CAAAO,aAAA,CAACN,IAAI;IAACO,KAAK,EAAE,CAACL,MAAM,CAACY,YAAY;EAAE,GAAET,MAAM,CAACU,UAAiB,CACzD,CACF,CAAC,eACPhB,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACM,KAAK,EAAEL,MAAM,CAACO;EAAoB,gBACtCV,KAAA,CAAAO,aAAA,CAACN,IAAI;IAACO,KAAK,EAAE,CAACL,MAAM,CAACQ,SAAS,EAAER,MAAM,CAACS,IAAI;EAAE,GAAC,OAAW,CAAC,eAC1DZ,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE,CAACL,MAAM,CAACU,YAAY,EAAEV,MAAM,CAACW,IAAI;EAAE,gBAC9Cd,KAAA,CAAAO,aAAA,CAACN,IAAI;IAACO,KAAK,EAAE,CAACL,MAAM,CAACY,YAAY;EAAE,GAAET,MAAM,CAACW,GAAU,CAClD,CACF,CACF,CAAC;AAEX,CAAC;AAED,eAAeb,UAAU"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import CardDescriptionContent from './CardDescriptionContent';
|
|
4
|
-
import { parseDateTime } from '../../../../utils/dateUtil';
|
|
5
|
-
import styles from './styles';
|
|
6
|
-
import { getDigitalStorageSize } from '../../../../utils/getSize';
|
|
7
|
-
const MetaCard = _ref => {
|
|
8
|
-
var _meta$sha256Checksum;
|
|
9
|
-
let {
|
|
10
|
-
meta
|
|
11
|
-
} = _ref;
|
|
12
|
-
const updatedAtText = useMemo(() => {
|
|
13
|
-
return parseDateTime(meta.updatedAt);
|
|
14
|
-
}, [meta.updatedAt]);
|
|
15
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
16
|
-
style: styles.metaConainer
|
|
17
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
18
|
-
style: styles.colContainer
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
20
|
-
style: [styles.titleText, styles.bold]
|
|
21
|
-
}, `v${meta.version}`), /*#__PURE__*/React.createElement(Text, {
|
|
22
|
-
style: [styles.subText]
|
|
23
|
-
}, meta.releaseNote)), /*#__PURE__*/React.createElement(View, {
|
|
24
|
-
style: styles.divider
|
|
25
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
26
|
-
style: styles.rowContainer
|
|
27
|
-
}, /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
28
|
-
title: 'ID',
|
|
29
|
-
subtitle: (_meta$sha256Checksum = meta.sha256Checksum) === null || _meta$sha256Checksum === void 0 ? void 0 : _meta$sha256Checksum.substring(0, 12)
|
|
30
|
-
}), /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
31
|
-
title: 'Updated At',
|
|
32
|
-
subtitle: updatedAtText
|
|
33
|
-
}), /*#__PURE__*/React.createElement(CardDescriptionContent, {
|
|
34
|
-
title: 'Size',
|
|
35
|
-
subtitle: getDigitalStorageSize(meta.size || 0)
|
|
36
|
-
})));
|
|
37
|
-
};
|
|
38
|
-
export default MetaCard;
|
|
39
|
-
//# sourceMappingURL=MetaCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Text","View","CardDescriptionContent","parseDateTime","styles","getDigitalStorageSize","MetaCard","_ref","_meta$sha256Checksum","meta","updatedAtText","updatedAt","createElement","style","metaConainer","colContainer","titleText","bold","version","subText","releaseNote","divider","rowContainer","title","subtitle","sha256Checksum","substring","size"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/MetaCard.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,OAAOC,MAAM,MAAM,UAAU;AAE7B,SAASC,qBAAqB,QAAQ,2BAA2B;AAMjE,MAAMC,QAA6B,GAAGC,IAAA,IAAc;EAAA,IAAAC,oBAAA;EAAA,IAAb;IAAEC;EAAK,CAAC,GAAAF,IAAA;EAC7C,MAAMG,aAAa,GAAGX,OAAO,CAAC,MAAM;IAClC,OAAOI,aAAa,CAACM,IAAI,CAACE,SAAS,CAAC;EACtC,CAAC,EAAE,CAACF,IAAI,CAACE,SAAS,CAAC,CAAC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SLOT_STATES } from '../../../../../types/meta.types';
|
|
4
|
-
import { NATIVE_CONSTANTS, STD_MARGIN } from '../../../../constants/appConstants';
|
|
5
|
-
import { COLORS } from '../../../../constants/colors';
|
|
6
|
-
function getSlotColor(slot) {
|
|
7
|
-
switch (slot) {
|
|
8
|
-
case NATIVE_CONSTANTS.DEFAULT_FOLDER_SLOT:
|
|
9
|
-
return '#9CA3AF';
|
|
10
|
-
case NATIVE_CONSTANTS.STABLE_FOLDER_SLOT:
|
|
11
|
-
return '#F59E0B';
|
|
12
|
-
case NATIVE_CONSTANTS.NEW_FOLDER_SLOT:
|
|
13
|
-
return COLORS.indigo;
|
|
14
|
-
case NATIVE_CONSTANTS.TEMP_FOLDER_SLOT:
|
|
15
|
-
return COLORS.green;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const StallionSlot = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
slot,
|
|
21
|
-
isActive
|
|
22
|
-
} = _ref;
|
|
23
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
24
|
-
style: [styles.slotItem, {
|
|
25
|
-
backgroundColor: getSlotColor(slot),
|
|
26
|
-
borderWidth: isActive ? 1 : 0
|
|
27
|
-
}]
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
const SlotView = props => {
|
|
31
|
-
const {
|
|
32
|
-
currentSlot,
|
|
33
|
-
tempHash,
|
|
34
|
-
stableHash,
|
|
35
|
-
newHash
|
|
36
|
-
} = props;
|
|
37
|
-
const activeSlot = currentSlot;
|
|
38
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
39
|
-
style: [styles.parentContainer, styles.rowContainer]
|
|
40
|
-
}, /*#__PURE__*/React.createElement(StallionSlot, {
|
|
41
|
-
slot: NATIVE_CONSTANTS.DEFAULT_FOLDER_SLOT,
|
|
42
|
-
hash: '',
|
|
43
|
-
isActive: activeSlot === SLOT_STATES.DEFAULT
|
|
44
|
-
}), stableHash ? /*#__PURE__*/React.createElement(StallionSlot, {
|
|
45
|
-
slot: NATIVE_CONSTANTS.STABLE_FOLDER_SLOT,
|
|
46
|
-
hash: stableHash || '',
|
|
47
|
-
isActive: activeSlot === SLOT_STATES.STABLE
|
|
48
|
-
}) : null, newHash ? /*#__PURE__*/React.createElement(StallionSlot, {
|
|
49
|
-
slot: NATIVE_CONSTANTS.NEW_FOLDER_SLOT,
|
|
50
|
-
hash: newHash || '',
|
|
51
|
-
isActive: activeSlot === SLOT_STATES.NEW
|
|
52
|
-
}) : null, tempHash ? /*#__PURE__*/React.createElement(StallionSlot, {
|
|
53
|
-
slot: NATIVE_CONSTANTS.TEMP_FOLDER_SLOT,
|
|
54
|
-
hash: tempHash || '',
|
|
55
|
-
isActive: false
|
|
56
|
-
}) : null);
|
|
57
|
-
};
|
|
58
|
-
const styles = StyleSheet.create({
|
|
59
|
-
parentContainer: {
|
|
60
|
-
justifyContent: 'flex-start',
|
|
61
|
-
alignItems: 'center',
|
|
62
|
-
flexDirection: 'row',
|
|
63
|
-
width: '100%',
|
|
64
|
-
paddingRight: STD_MARGIN,
|
|
65
|
-
paddingVertical: STD_MARGIN,
|
|
66
|
-
backgroundColor: COLORS.white
|
|
67
|
-
},
|
|
68
|
-
rowContainer: {
|
|
69
|
-
flexDirection: 'row'
|
|
70
|
-
},
|
|
71
|
-
slotItem: {
|
|
72
|
-
flex: 1,
|
|
73
|
-
width: '100%',
|
|
74
|
-
height: STD_MARGIN,
|
|
75
|
-
marginLeft: STD_MARGIN,
|
|
76
|
-
borderRadius: STD_MARGIN / 2
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
export default SlotView;
|
|
80
|
-
//# sourceMappingURL=SlotView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","React","SLOT_STATES","NATIVE_CONSTANTS","STD_MARGIN","COLORS","getSlotColor","slot","DEFAULT_FOLDER_SLOT","STABLE_FOLDER_SLOT","NEW_FOLDER_SLOT","indigo","TEMP_FOLDER_SLOT","green","StallionSlot","_ref","isActive","createElement","style","styles","slotItem","backgroundColor","borderWidth","SlotView","props","currentSlot","tempHash","stableHash","newHash","activeSlot","parentContainer","rowContainer","hash","DEFAULT","STABLE","NEW","create","justifyContent","alignItems","flexDirection","width","paddingRight","paddingVertical","white","flex","height","marginLeft","borderRadius"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/SlotView.tsx"],"mappings":"AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAEEC,WAAW,QACN,iCAAiC;AACxC,SACEC,gBAAgB,EAChBC,UAAU,QACL,oCAAoC;AAC3C,SAASC,MAAM,QAAQ,8BAA8B;AAcrD,SAASC,YAAYA,CAACC,IAAc,EAAU;EAC5C,QAAQA,IAAI;IACV,KAAKJ,gBAAgB,CAACK,mBAAmB;MACvC,OAAO,SAAS;IAClB,KAAKL,gBAAgB,CAACM,kBAAkB;MACtC,OAAO,SAAS;IAClB,KAAKN,gBAAgB,CAACO,eAAe;MACnC,OAAOL,MAAM,CAACM,MAAM;IACtB,KAAKR,gBAAgB,CAACS,gBAAgB;MACpC,OAAOP,MAAM,CAACQ,KAAK;EACvB;AACF;AAEA,MAAMC,YAAqC,GAAGC,IAAA,IAAwB;EAAA,IAAvB;IAAER,IAAI;IAAES;EAAS,CAAC,GAAAD,IAAA;EAC/D,oBACEd,KAAA,CAAAgB,aAAA,CAACjB,IAAI;IACHkB,KAAK,EAAE,CACLC,MAAM,CAACC,QAAQ,EACf;MACEC,eAAe,EAAEf,YAAY,CAACC,IAAI,CAAC;MACnCe,WAAW,EAAEN,QAAQ,GAAG,CAAC,GAAG;IAC9B,CAAC;EACD,CACH,CAAC;AAEN,CAAC;AAED,MAAMO,QAAqC,GAAIC,KAAK,IAAK;EACvD,MAAM;IAAEC,WAAW;IAAEC,QAAQ;IAAEC,UAAU;IAAEC;EAAQ,CAAC,GAAGJ,KAAK;EAC5D,MAAMK,UAAU,G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,CAAC;EACDZ,YAAY,EAAE;IACZQ,aAAa,EAAE;EACjB,CAAC;EACDnB,QAAQ,EAAE;IACRwB,IAAI,EAAE,CAAC;IACPJ,KAAK,EAAE,MAAM;IACbK,MAAM,EAAEzC,UAAU;IAClB0C,UAAU,EAAE1C,UAAU;IACtB2C,YAAY,EAAE3C,UAAU,GAAG;EAC7B;AACF,CAAC,CAAC;AAEF,eAAemB,QAAQ"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
2
|
-
import { HEADER_SLAB_HEIGHT, STD_MARGIN } from '../../../../../constants/appConstants';
|
|
3
|
-
import { COLORS } from '../../../../../constants/colors';
|
|
4
|
-
const styles = StyleSheet.create({
|
|
5
|
-
cardContainer: {
|
|
6
|
-
margin: STD_MARGIN,
|
|
7
|
-
marginBottom: STD_MARGIN * 1.5,
|
|
8
|
-
backgroundColor: COLORS.white,
|
|
9
|
-
borderRadius: STD_MARGIN,
|
|
10
|
-
shadowColor: COLORS.black,
|
|
11
|
-
shadowOffset: {
|
|
12
|
-
height: 2,
|
|
13
|
-
width: 0
|
|
14
|
-
},
|
|
15
|
-
shadowOpacity: 0.08,
|
|
16
|
-
elevation: 3,
|
|
17
|
-
shadowRadius: 6,
|
|
18
|
-
borderWidth: 0.5,
|
|
19
|
-
borderColor: COLORS.black2
|
|
20
|
-
},
|
|
21
|
-
infoSection: {
|
|
22
|
-
width: '100%'
|
|
23
|
-
},
|
|
24
|
-
actionSection: {
|
|
25
|
-
flex: 1,
|
|
26
|
-
alignItems: 'center'
|
|
27
|
-
},
|
|
28
|
-
justifyCenter: {
|
|
29
|
-
justifyContent: 'center'
|
|
30
|
-
},
|
|
31
|
-
rowFlex: {
|
|
32
|
-
flexDirection: 'row'
|
|
33
|
-
},
|
|
34
|
-
rowContainer: {
|
|
35
|
-
flexDirection: 'row',
|
|
36
|
-
justifyContent: 'space-between',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
padding: STD_MARGIN
|
|
39
|
-
},
|
|
40
|
-
colContainer: {
|
|
41
|
-
flexDirection: 'column'
|
|
42
|
-
},
|
|
43
|
-
downloadButton: {
|
|
44
|
-
backgroundColor: COLORS.black,
|
|
45
|
-
padding: STD_MARGIN,
|
|
46
|
-
borderRadius: STD_MARGIN
|
|
47
|
-
},
|
|
48
|
-
configCardContainer: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
flexDirection: 'row',
|
|
51
|
-
justifyContent: 'flex-start',
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
paddingHorizontal: STD_MARGIN,
|
|
54
|
-
marginVertical: STD_MARGIN / 2
|
|
55
|
-
},
|
|
56
|
-
appliedText: {
|
|
57
|
-
color: COLORS.green,
|
|
58
|
-
fontWeight: 'bold',
|
|
59
|
-
fontSize: 14
|
|
60
|
-
},
|
|
61
|
-
container: {},
|
|
62
|
-
metaConainer: {
|
|
63
|
-
backgroundColor: COLORS.white,
|
|
64
|
-
margin: STD_MARGIN,
|
|
65
|
-
borderRadius: STD_MARGIN,
|
|
66
|
-
padding: STD_MARGIN
|
|
67
|
-
},
|
|
68
|
-
divider: {
|
|
69
|
-
borderBottomWidth: 0.5,
|
|
70
|
-
borderColor: COLORS.black2,
|
|
71
|
-
marginVertical: STD_MARGIN,
|
|
72
|
-
marginHorizontal: STD_MARGIN
|
|
73
|
-
},
|
|
74
|
-
subText: {
|
|
75
|
-
fontSize: HEADER_SLAB_HEIGHT / 3,
|
|
76
|
-
marginVertical: STD_MARGIN / 2,
|
|
77
|
-
color: COLORS.text_major
|
|
78
|
-
},
|
|
79
|
-
titleText: {
|
|
80
|
-
flex: 1,
|
|
81
|
-
fontSize: HEADER_SLAB_HEIGHT / 2.5,
|
|
82
|
-
color: COLORS.black
|
|
83
|
-
},
|
|
84
|
-
subTitleText: {
|
|
85
|
-
textAlign: 'right',
|
|
86
|
-
fontSize: HEADER_SLAB_HEIGHT / 3,
|
|
87
|
-
color: COLORS.black7
|
|
88
|
-
},
|
|
89
|
-
bold: {
|
|
90
|
-
fontWeight: 'bold'
|
|
91
|
-
},
|
|
92
|
-
releaseNoteText: {
|
|
93
|
-
fontSize: 14,
|
|
94
|
-
fontWeight: 'bold',
|
|
95
|
-
color: COLORS.black7
|
|
96
|
-
},
|
|
97
|
-
releaseNoteDescriptionText: {
|
|
98
|
-
fontSize: 14,
|
|
99
|
-
width: '70%',
|
|
100
|
-
color: COLORS.black,
|
|
101
|
-
marginLeft: STD_MARGIN / 2
|
|
102
|
-
},
|
|
103
|
-
descContainer: {
|
|
104
|
-
flexDirection: 'row',
|
|
105
|
-
alignItems: 'flex-start',
|
|
106
|
-
padding: STD_MARGIN,
|
|
107
|
-
marginHorizontal: STD_MARGIN,
|
|
108
|
-
marginBottom: STD_MARGIN / 2,
|
|
109
|
-
backgroundColor: COLORS.black1,
|
|
110
|
-
borderRadius: STD_MARGIN / 2
|
|
111
|
-
},
|
|
112
|
-
rightBorder: {
|
|
113
|
-
borderRightWidth: 1,
|
|
114
|
-
borderColor: COLORS.black2
|
|
115
|
-
},
|
|
116
|
-
flex: {
|
|
117
|
-
flex: 1
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
export default styles;
|
|
121
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","HEADER_SLAB_HEIGHT","STD_MARGIN","COLORS","styles","create","cardContainer","margin","marginBottom","backgroundColor","white","borderRadius","shadowColor","black","shadowOffset","height","width","shadowOpacity","elevation","shadowRadius","borderWidth","borderColor","black2","infoSection","actionSection","flex","alignItems","justifyCenter","justifyContent","rowFlex","flexDirection","rowContainer","padding","colContainer","downloadButton","configCardContainer","paddingHorizontal","marginVertical","appliedText","color","green","fontWeight","fontSize","container","metaConainer","divider","borderBottomWidth","marginHorizontal","subText","text_major","titleText","subTitleText","textAlign","black7","bold","releaseNoteText","releaseNoteDescriptionText","marginLeft","descContainer","black1","rightBorder","borderRightWidth"],"sourceRoot":"../../../../../../../../src","sources":["main/components/modules/listing/components/styles/index.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SACEC,kBAAkB,EAClBC,UAAU,QACL,uCAAuC;AAC9C,SAASC,MAAM,QAAQ,iCAAiC;AAExD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/BC,aAAa,EAAE;IACbC,MAAM,EAAEL,UAAU;IAClBM,YAAY,EAAEN,UAAU,GAAG,GAAG;IAC9BO,eAAe,EAAEN,MAAM,CAACO,KAAK;IAC7BC,YAAY,EAAET,UAAU;IACxBU,WAAW,EAAET,MAAM,CAACU,KAAK;IACzBC,YAAY,EAAE;MAAEC,MAAM,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAElB,MAAM,CAACmB;EACtB,CAAC;EACDC,WAAW,EAAE;IACXP,KAAK,EAAE;EACT,CAAC;EACDQ,aAAa,EAAE;IACbC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACDC,aAAa,EAAE;IACbC,cAAc,EAAE;EAClB,CAAC;EACDC,OAAO,EAAE;IACPC,aAAa,EAAE;EACjB,CAAC;EACDC,YAAY,EAAE;IACZD,aAAa,EAAE,KAAK;IACpBF,cAAc,EAAE,eAAe;IAC/BF,UAAU,EAAE,QAAQ;IACpBM,OAAO,EAAE9B;EACX,CAAC;EACD+B,YAAY,EAAE;IACZH,aAAa,EAAE;EACjB,CAAC;EACDI,cAAc,EAAE;IACdzB,eAAe,EAAEN,MAAM,CAACU,KAAK;IAC7BmB,OAAO,EAAE9B,UAAU;IACnBS,YAAY,EAAET;EAChB,CAAC;EACDiC,mBAAmB,EAAE;IACnBV,IAAI,EAAE,CAAC;IACPK,aAAa,EAAE,KAAK;IACpBF,cAAc,EAAE,YAAY;IAC5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,CAACU,KAAK;IACnB4C,UAAU,EAAEvD,UAAU,GAAG;EAC3B,CAAC;EACDwD,aAAa,EAAE;IACb5B,aAAa,EAAE,KAAK;IACpBJ,UAAU,EAAE,YAAY;IACxBM,OAAO,EAAE9B,UAAU;IACnB6C,gBAAgB,EAAE7C,UAAU;IAC5BM,YAAY,EAAEN,UAAU,GAAG,CAAC;IAC5BO,eAAe,EAAEN,MAAM,CAACwD,MAAM;IAC9BhD,YAAY,EAAET,UAAU,GAAG;EAC7B,CAAC;EACD0D,WAAW,EAAE;IACXC,gBAAgB,EAAE,CAAC;IACnBxC,WAAW,EAAElB,MAAM,CAACmB;EACtB,CAAC;EACDG,IAAI,EAAE;IACJA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAerB,MAAM"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { useCallback, useContext, useEffect, useMemo } from 'react';
|
|
2
|
-
import { CARD_TYPES, IS_ANDROID, VERSION_PREFIX } from '../../../../constants/appConstants';
|
|
3
|
-
import { GlobalContext } from '../../../../state';
|
|
4
|
-
const useListing = () => {
|
|
5
|
-
const {
|
|
6
|
-
bucketState,
|
|
7
|
-
bundleState,
|
|
8
|
-
metaState,
|
|
9
|
-
actions: {
|
|
10
|
-
fetchBuckets,
|
|
11
|
-
fetchBundles,
|
|
12
|
-
selectBucket
|
|
13
|
-
}
|
|
14
|
-
} = useContext(GlobalContext);
|
|
15
|
-
const bundlesListingEnabled = useMemo(() => bundleState.selectedBucketId ? true : false, [bundleState.selectedBucketId]);
|
|
16
|
-
const listingLoading = useMemo(() => {
|
|
17
|
-
if (bundlesListingEnabled) return bundleState.isLoading;
|
|
18
|
-
return bucketState.isLoading;
|
|
19
|
-
}, [bucketState.isLoading, bundleState.isLoading, bundlesListingEnabled]);
|
|
20
|
-
const nextPageLoading = useMemo(() => {
|
|
21
|
-
if (bundlesListingEnabled) return bundleState.isNextPageLoading;
|
|
22
|
-
return false;
|
|
23
|
-
}, [bundleState.isNextPageLoading, bundlesListingEnabled]);
|
|
24
|
-
const listingData = useMemo(() => {
|
|
25
|
-
var _bucketState$data;
|
|
26
|
-
if (bundlesListingEnabled) {
|
|
27
|
-
var _bundleState$data;
|
|
28
|
-
return (bundleState === null || bundleState === void 0 ? void 0 : (_bundleState$data = bundleState.data) === null || _bundleState$data === void 0 ? void 0 : _bundleState$data.map(bundleData => ({
|
|
29
|
-
type: CARD_TYPES.BUNDLE,
|
|
30
|
-
id: bundleData.id,
|
|
31
|
-
version: bundleData.version,
|
|
32
|
-
name: `${VERSION_PREFIX}${bundleData.version}`,
|
|
33
|
-
description: bundleData.releaseNote,
|
|
34
|
-
updatedAt: bundleData.updatedAt,
|
|
35
|
-
author: bundleData.author.fullName,
|
|
36
|
-
downloadUrl: bundleData.downloadUrl
|
|
37
|
-
}))) || [];
|
|
38
|
-
}
|
|
39
|
-
return ((_bucketState$data = bucketState.data) === null || _bucketState$data === void 0 ? void 0 : _bucketState$data.map(bucketItem => ({
|
|
40
|
-
type: CARD_TYPES.BUCKET,
|
|
41
|
-
id: bucketItem.id,
|
|
42
|
-
name: bucketItem.name,
|
|
43
|
-
updatedAt: bucketItem.updatedAt,
|
|
44
|
-
bundleCount: (IS_ANDROID ? bucketItem === null || bucketItem === void 0 ? void 0 : bucketItem.latestAndroidBundleVersion : bucketItem === null || bucketItem === void 0 ? void 0 : bucketItem.latestIosBundleVersion) || 0
|
|
45
|
-
}))) || [];
|
|
46
|
-
}, [bucketState.data, bundleState.data, bundlesListingEnabled]);
|
|
47
|
-
const listingError = useMemo(() => {
|
|
48
|
-
if (bundlesListingEnabled) return bundleState.error;
|
|
49
|
-
return bucketState.error;
|
|
50
|
-
}, [bucketState.error, bundleState.error, bundlesListingEnabled]);
|
|
51
|
-
const fetchListing = useCallback(() => {
|
|
52
|
-
if (bundlesListingEnabled) {
|
|
53
|
-
fetchBundles();
|
|
54
|
-
} else {
|
|
55
|
-
fetchBuckets();
|
|
56
|
-
}
|
|
57
|
-
}, [fetchBuckets, fetchBundles, bundlesListingEnabled]);
|
|
58
|
-
const setBucketSelection = useCallback(bucketId => {
|
|
59
|
-
selectBucket(bucketId);
|
|
60
|
-
fetchBundles(bucketId);
|
|
61
|
-
}, [selectBucket, fetchBundles]);
|
|
62
|
-
const fetchNextPage = useCallback(() => {
|
|
63
|
-
if (bundlesListingEnabled && !bundleState.isNextPageLoading && !bundleState.isLoading && bundleState.pageOffset) {
|
|
64
|
-
fetchBundles(bundleState.selectedBucketId, bundleState.pageOffset);
|
|
65
|
-
}
|
|
66
|
-
}, [fetchBundles, bundlesListingEnabled, bundleState.selectedBucketId, bundleState.pageOffset, bundleState.isNextPageLoading, bundleState.isLoading]);
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
fetchListing();
|
|
69
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70
|
-
}, []);
|
|
71
|
-
return {
|
|
72
|
-
listingData,
|
|
73
|
-
listingError,
|
|
74
|
-
listingLoading,
|
|
75
|
-
metaState,
|
|
76
|
-
fetchListing,
|
|
77
|
-
setBucketSelection,
|
|
78
|
-
fetchNextPage,
|
|
79
|
-
nextPageLoading,
|
|
80
|
-
isBackEnabled: bundleState !== null && bundleState !== void 0 && bundleState.selectedBucketId ? true : false
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
export default useListing;
|
|
84
|
-
//# sourceMappingURL=useListing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","useEffect","useMemo","CARD_TYPES","IS_ANDROID","VERSION_PREFIX","GlobalContext","useListing","bucketState","bundleState","metaState","actions","fetchBuckets","fetchBundles","selectBucket","bundlesListingEnabled","selectedBucketId","listingLoading","isLoading","nextPageLoading","isNextPageLoading","listingData","_bucketState$data","_bundleState$data","data","map","bundleData","type","BUNDLE","id","version","name","description","releaseNote","updatedAt","author","fullName","downloadUrl","bucketItem","BUCKET","bundleCount","latestAndroidBundleVersion","latestIosBundleVersion","listingError","error","fetchListing","setBucketSelection","bucketId","fetchNextPage","pageOffset","isBackEnabled"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/hooks/useListing.ts"],"mappings":"AAAA,SAASA,WAAW,EAAEC,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAEnE,SACEC,UAAU,EACVC,UAAU,EACVC,cAAc,QACT,oCAAoC;AAC3C,SAASC,aAAa,QAAQ,mBAAmB;AAIjD,MAAMC,UAAU,GAAGA,CAAA,KAAM;EACvB,MAAM;IACJC,WAAW;IACXC,WAAW;IACXC,SAAS;IACTC,OAAO,EAAE;MAAEC,YAAY;MAAEC,YAAY;MAAEC;IAAa;EACtD,CAAC,GAAGd,UAAU,CAACM,aAAa,CAAC;EAC7B,MAAMS,qBAAqB,GAAGb,OAAO,CACnC,MAAOO,WAAW,CAACO,gBAAgB,GAAG,IAAI,GAAG,KAAM,EACnD,CAACP,WAAW,CAACO,gBAAgB,CAC/B,CAAC;EACD,MAAMC,cAAc,GAAGf,OAAO,CAAC,MAAM;IACnC,IAAIa,qBAAqB,EAAE,OAAON,WAAW,CAACS,SAAS;IACvD,OAAOV,WAAW,CAACU,SAAS;EAC9B,CAAC,EAAE,CAACV,WAAW,CAACU,SAAS,EAAET,WAAW,CAACS,SAAS,EAAEH,qBAAqB,CAAC,CAAC;EAEzE,MAAMI,eAAe,GAAGjB,OAAO,CAAC,MAAM;IACpC,IAAIa,qBAAqB,EAAE,OAAON,WAAW,CAACW,iBAAiB;IAC/D,OAAO,KAAK;EACd,CAAC,EAAE,CAACX,WAAW,CAACW,iBAAiB,EAAEL,qBAAqB,CAAC,CAAC;EAE1D,MAAMM,WAAW,GAAGnB,OAAO,CAAgC,MAAM;IAAA,IAAAoB,iBAAA;IAC/D,IAAIP,qBAAqB,EAAE;MAAA,IAAAQ,iBAAA;MACzB,OACE,CAAAd,WAAW,aAAXA,WAAW,wBAAAc,iBAAA,GAAXd,WAAW,CAAEe,IAAI,cAAAD,iBAAA,uBAA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ACjE,MAAM8B,YAAY,GAAG9C,WAAW,CAAC,MAAM;IACrC,IAAIgB,qBAAqB,EAAE;MACzBF,YAAY,CAAC,CAAC;IAChB,CAAC,MAAM;MACLD,YAAY,CAAC,CAAC;IAChB;EACF,CAAC,EAAE,CAACA,YAAY,EAAEC,YAAY,EAAEE,qBAAqB,CAAC,CAAC;EAEvD,MAAM+B,kBAAkB,GAAG/C,WAAW,CACnCgD,QAAwB,IAAK;IAC5BjC,YAAY,CAACiC,QAAQ,CAAC;IACtBlC,YAAY,CAACkC,QAAQ,CAAC;EACxB,CAAC,EACD,CAACjC,YAAY,EAAED,YAAY,CAC7B,CAAC;EAED,MAAMmC,aAAa,GAAGjD,WAAW,CAAC,MAAM;IACtC,IACEgB,qBAAqB,IACrB,CAACN,WAAW,CAACW,iBAAiB,IAC9B,CAACX,WAAW,CAACS,SAAS,IACtBT,WAAW,CAACwC,UAAU,EACtB;MACApC,YAAY,CAACJ,WAAW,CAACO,gBAAgB,EAAEP,WAAW,CAACwC,UAAU,CAAC;IACpE;EACF,CAAC,EAAE,CACDpC,YAAY,EACZE,qBAAqB,EACrBN,WAAW,CAACO,gBAAgB,EAC5BP,WAAW,CAACwC,UAAU,EACtBxC,WAAW,CAACW,iBAAiB,EAC7BX,WAAW,CAACS,SAAS,CACtB,CAAC;EAEFjB,SAAS,CAAC,MAAM;IACd4C,YAAY,CAAC,CAAC;IACd;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLxB,WAAW;IACXsB,YAAY;IACZ1B,cAAc;IACdP,SAAS;IACTmC,YAAY;IACZC,kBAAkB;IAClBE,aAAa;IACb7B,eAAe;IACf+B,aAAa,EAAEzC,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEO,gBAAgB,GAAG,IAAI,GAAG;EACxD,CAAC;AACH,CAAC;AAED,eAAeT,UAAU"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React, { memo, useEffect, useState } from 'react';
|
|
3
|
-
import { RefreshControl, FlatList, View } from 'react-native';
|
|
4
|
-
import useListing from './hooks/useListing';
|
|
5
|
-
import ErrorView from '../../../components/common/ErrorView';
|
|
6
|
-
import BucketCard from './components/BucketCard';
|
|
7
|
-
import { CARD_TYPES, END_REACH_THRESHOLD, IS_ANDROID } from '../../../constants/appConstants';
|
|
8
|
-
import BundleCard from './components/BundleCard';
|
|
9
|
-
import FooterLoader from '../../common/FooterLoader';
|
|
10
|
-
import styles from './styles';
|
|
11
|
-
const BucketOrBundle = /*#__PURE__*/memo(_ref => {
|
|
12
|
-
let {
|
|
13
|
-
data,
|
|
14
|
-
setBucketSelection
|
|
15
|
-
} = _ref;
|
|
16
|
-
return (data === null || data === void 0 ? void 0 : data.type) === CARD_TYPES.BUCKET ? /*#__PURE__*/React.createElement(BucketCard, _extends({
|
|
17
|
-
key: data.id
|
|
18
|
-
}, data, {
|
|
19
|
-
handlePress: () => setBucketSelection(data.id)
|
|
20
|
-
})) : (data === null || data === void 0 ? void 0 : data.type) === CARD_TYPES.BUNDLE && /*#__PURE__*/React.createElement(BundleCard, _extends({
|
|
21
|
-
key: data.id
|
|
22
|
-
}, data)) || null;
|
|
23
|
-
});
|
|
24
|
-
const Listing = () => {
|
|
25
|
-
const {
|
|
26
|
-
listingData,
|
|
27
|
-
listingLoading,
|
|
28
|
-
listingError,
|
|
29
|
-
fetchListing,
|
|
30
|
-
setBucketSelection,
|
|
31
|
-
fetchNextPage,
|
|
32
|
-
nextPageLoading
|
|
33
|
-
} = useListing();
|
|
34
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
setIsMounted(true);
|
|
37
|
-
}, [setIsMounted]);
|
|
38
|
-
if (listingError) {
|
|
39
|
-
return /*#__PURE__*/React.createElement(ErrorView, {
|
|
40
|
-
error: listingError,
|
|
41
|
-
onRetry: fetchListing
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
if (listingLoading && !listingData.length && !IS_ANDROID) {
|
|
45
|
-
return /*#__PURE__*/React.createElement(FooterLoader, null);
|
|
46
|
-
}
|
|
47
|
-
if (!isMounted) return null;
|
|
48
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
49
|
-
style: styles.flex
|
|
50
|
-
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
51
|
-
style: styles.mainContainer,
|
|
52
|
-
contentContainerStyle: styles.mainListContainer,
|
|
53
|
-
refreshControl: /*#__PURE__*/React.createElement(RefreshControl, {
|
|
54
|
-
refreshing: listingLoading,
|
|
55
|
-
onRefresh: fetchListing
|
|
56
|
-
}),
|
|
57
|
-
data: listingData,
|
|
58
|
-
renderItem: _ref2 => {
|
|
59
|
-
let {
|
|
60
|
-
item
|
|
61
|
-
} = _ref2;
|
|
62
|
-
return /*#__PURE__*/React.createElement(BucketOrBundle, {
|
|
63
|
-
key: item.id,
|
|
64
|
-
data: item,
|
|
65
|
-
setBucketSelection: setBucketSelection
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
keyExtractor: item => item.id,
|
|
69
|
-
ListFooterComponent: nextPageLoading ? /*#__PURE__*/React.createElement(FooterLoader, null) : null,
|
|
70
|
-
onEndReached: fetchNextPage,
|
|
71
|
-
onEndReachedThreshold: END_REACH_THRESHOLD
|
|
72
|
-
}));
|
|
73
|
-
};
|
|
74
|
-
export default /*#__PURE__*/memo(Listing);
|
|
75
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useEffect","useState","RefreshControl","FlatList","View","useListing","ErrorView","BucketCard","CARD_TYPES","END_REACH_THRESHOLD","IS_ANDROID","BundleCard","FooterLoader","styles","BucketOrBundle","_ref","data","setBucketSelection","type","BUCKET","createElement","_extends","key","id","handlePress","BUNDLE","Listing","listingData","listingLoading","listingError","fetchListing","fetchNextPage","nextPageLoading","isMounted","setIsMounted","error","onRetry","length","style","flex","mainContainer","contentContainerStyle","mainListContainer","refreshControl","refreshing","onRefresh","renderItem","_ref2","item","keyExtractor","ListFooterComponent","onEndReached","onEndReachedThreshold"],"sourceRoot":"../../../../../../src","sources":["main/components/modules/listing/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,cAAc,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAE7D,OAAOC,UAAU,MAAM,oBAAoB;AAE3C,OAAOC,SAAS,MAAM,sCAAsC;AAC5D,OAAOC,UAAU,MAAuB,yBAAyB;AACjE,SACEC,UAAU,EACVC,mBAAmB,EACnBC,UAAU,QACL,iCAAiC;AACxC,OAAOC,UAAU,MAAuB,yBAAyB;AACjE,OAAOC,YAAY,MAAM,2BAA2B;AAEpD,OAAOC,MAAM,MAAM,UAAU;AAO7B,MAAMC,cAAyC,gBAAGf,IAAI,CACpDgB,IAAA,IAAkC;EAAA,IAAjC;IAAEC,IAAI;IAAEC;EAAmB,CAAC,GAAAF,IAAA;EAC3B,OAAO,CAAAC,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,IAAI,MAAKV,UAAU,CAACW,MAAM,gBACrCrB,KAAA,CAAAsB,aAAA,CAACb,UAAU,EAAAc,QAAA;IACTC,GAAG,EAAEN,IAAI,CAACO;EAAG,GACTP,IAAI;IACRQ,WAAW,EAAEA,CAAA,KAAMP,kBAAkB,CAACD,IAAI,CAACO,EAAE;EAAE,EAChD,CAAC,GAED,CAAAP,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,IAAI,MAAKV,UAAU,CAACiB,MAAM,iBAC/B3B,KAAA,CAAAsB,aAAA,CAACT,UAAU,EAAAU,QAAA;IAACC,GAAG,EAAEN,IAAI,CAAC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bQ,GAAG,EAAE0B,IAAI,CAACzB,EAAG;QACbP,IAAI,EAAEgC,IAAK;QACX/B,kBAAkB,EAAEA;MAAmB,CACxC,CAAC;IAAA,CACF;IACFgC,YAAY,EAAGD,IAAI,IAAKA,IAAI,CAACzB,EAAG;IAChC2B,mBAAmB,EAAElB,eAAe,gBAAGlC,KAAA,CAAAsB,aAAA,CAACR,YAAY,MAAE,CAAC,GAAG,IAAK;IAC/DuC,YAAY,EAAEpB,aAAc;IAC5BqB,qBAAqB,EAAE3C;EAAoB,CAC5C,CACG,CAAC;AAEX,CAAC;AAED,4BAAeV,IAAI,CAAC2B,OAAO,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
2
|
-
import { COLORS } from '../../../constants/colors';
|
|
3
|
-
import { STD_MARGIN } from '../../../constants/appConstants';
|
|
4
|
-
const styles = StyleSheet.create({
|
|
5
|
-
mainContainer: {
|
|
6
|
-
backgroundColor: COLORS.background_grey
|
|
7
|
-
},
|
|
8
|
-
mainListContainer: {
|
|
9
|
-
flexGrow: 1,
|
|
10
|
-
backgroundColor: COLORS.background_grey,
|
|
11
|
-
paddingBottom: STD_MARGIN * 2
|
|
12
|
-
},
|
|
13
|
-
initalLoaderContainer: {
|
|
14
|
-
width: '100%',
|
|
15
|
-
paddingTop: STD_MARGIN * 3,
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
alignItems: 'center'
|
|
18
|
-
},
|
|
19
|
-
flex: {
|
|
20
|
-
flex: 1
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export default styles;
|
|
24
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","COLORS","STD_MARGIN","styles","create","mainContainer","backgroundColor","background_grey","mainListContainer","flexGrow","paddingBottom","initalLoaderContainer","width","paddingTop","justifyContent","alignItems","flex"],"sourceRoot":"../../../../../../src","sources":["main/components/modules/listing/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,UAAU,QAAQ,iCAAiC;AAE5D,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,aAAa,EAAE;IACbC,eAAe,EAAEL,MAAM,CAACM;EAC1B,CAAC;EACDC,iBAAiB,EAAE;IACjBC,QAAQ,EAAE,CAAC;IACXH,eAAe,EAAEL,MAAM,CAACM,eAAe;IACvCG,aAAa,EAAER,UAAU,GAAG;EAC9B,CAAC;EACDS,qBAAqB,EAAE;IACrBC,KAAK,EAAE,MAAM;IACbC,UAAU,EAAEX,UAAU,GAAG,CAAC;IAC1BY,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,IAAI,EAAE;IACJA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAeb,MAAM"}
|