react-native-stallion 2.4.2 → 2.4.3-alpha.2
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/android/src/main/java/com/stallion/storage/StallionConfig.java +2 -10
- package/ios/main/StallionConfig.m +2 -6
- 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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useCallback, useContext, useState } from 'react';
|
|
2
|
+
import { ScrollView, View } from 'react-native';
|
|
3
|
+
import DeviceCard from '../components/DeviceCard';
|
|
4
|
+
import ProdBundleCard from '../components/ProdBundleCard';
|
|
5
|
+
import SectionLabel from '../components/SectionLabel';
|
|
6
|
+
import StateCard from '../components/StateCard';
|
|
7
|
+
import { PROD_EMPTY_SUBTITLE, PROD_EMPTY_TITLE, SECTION_LABELS } from '../../../../constants/appConstants';
|
|
8
|
+
import { GlobalContext } from '../../../../state';
|
|
9
|
+
import { restart } from '../../../../utils/StallionNativeUtils';
|
|
10
|
+
import styles from '../styles';
|
|
11
|
+
const Production = () => {
|
|
12
|
+
const {
|
|
13
|
+
configState,
|
|
14
|
+
updateMetaState
|
|
15
|
+
} = useContext(GlobalContext);
|
|
16
|
+
const [expandedNotes, setExpandedNotes] = useState({});
|
|
17
|
+
const newBundle = updateMetaState.newBundle;
|
|
18
|
+
const activeBundle = updateMetaState.currentlyRunningBundle;
|
|
19
|
+
const hasBundles = !!(newBundle || activeBundle);
|
|
20
|
+
const handleToggleExpand = useCallback(bundleId => {
|
|
21
|
+
setExpandedNotes(previous => ({
|
|
22
|
+
...previous,
|
|
23
|
+
[bundleId]: !previous[bundleId]
|
|
24
|
+
}));
|
|
25
|
+
}, []);
|
|
26
|
+
const handleRestart = useCallback(() => {
|
|
27
|
+
requestAnimationFrame(() => restart());
|
|
28
|
+
}, []);
|
|
29
|
+
return /*#__PURE__*/React.createElement(ScrollView, {
|
|
30
|
+
style: styles.content,
|
|
31
|
+
contentContainerStyle: styles.screenPadding,
|
|
32
|
+
showsVerticalScrollIndicator: false
|
|
33
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
style: styles.section
|
|
35
|
+
}, /*#__PURE__*/React.createElement(SectionLabel, {
|
|
36
|
+
label: SECTION_LABELS.THIS_DEVICE
|
|
37
|
+
}), /*#__PURE__*/React.createElement(DeviceCard, {
|
|
38
|
+
appVersion: configState === null || configState === void 0 ? void 0 : configState.appVersion,
|
|
39
|
+
uid: configState === null || configState === void 0 ? void 0 : configState.uid
|
|
40
|
+
})), newBundle ? /*#__PURE__*/React.createElement(View, {
|
|
41
|
+
style: activeBundle ? styles.section : styles.sectionLast
|
|
42
|
+
}, /*#__PURE__*/React.createElement(SectionLabel, {
|
|
43
|
+
label: SECTION_LABELS.NEW_BUNDLE
|
|
44
|
+
}), /*#__PURE__*/React.createElement(ProdBundleCard, {
|
|
45
|
+
meta: newBundle,
|
|
46
|
+
variant: "pending",
|
|
47
|
+
expanded: !!expandedNotes[newBundle.id],
|
|
48
|
+
onToggleExpand: () => handleToggleExpand(newBundle.id),
|
|
49
|
+
onRestart: handleRestart
|
|
50
|
+
})) : null, activeBundle ? /*#__PURE__*/React.createElement(View, {
|
|
51
|
+
style: styles.sectionLast
|
|
52
|
+
}, /*#__PURE__*/React.createElement(SectionLabel, {
|
|
53
|
+
label: SECTION_LABELS.ACTIVE_BUNDLE
|
|
54
|
+
}), /*#__PURE__*/React.createElement(ProdBundleCard, {
|
|
55
|
+
meta: activeBundle,
|
|
56
|
+
variant: "active",
|
|
57
|
+
expanded: !!expandedNotes[activeBundle.id],
|
|
58
|
+
onToggleExpand: () => handleToggleExpand(activeBundle.id)
|
|
59
|
+
})) : null, !hasBundles ? /*#__PURE__*/React.createElement(StateCard, {
|
|
60
|
+
title: PROD_EMPTY_TITLE,
|
|
61
|
+
subtitle: PROD_EMPTY_SUBTITLE
|
|
62
|
+
}) : null);
|
|
63
|
+
};
|
|
64
|
+
export default Production;
|
|
65
|
+
//# sourceMappingURL=Production.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useContext","useState","ScrollView","View","DeviceCard","ProdBundleCard","SectionLabel","StateCard","PROD_EMPTY_SUBTITLE","PROD_EMPTY_TITLE","SECTION_LABELS","GlobalContext","restart","styles","Production","configState","updateMetaState","expandedNotes","setExpandedNotes","newBundle","activeBundle","currentlyRunningBundle","hasBundles","handleToggleExpand","bundleId","previous","handleRestart","requestAnimationFrame","createElement","style","content","contentContainerStyle","screenPadding","showsVerticalScrollIndicator","section","label","THIS_DEVICE","appVersion","uid","sectionLast","NEW_BUNDLE","meta","variant","expanded","id","onToggleExpand","onRestart","ACTIVE_BUNDLE","title","subtitle"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/devMenu/screens/Production.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,UAAU,MAAM,0BAA0B;AACjD,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,YAAY,MAAM,4BAA4B;AACrD,OAAOC,SAAS,MAAM,yBAAyB;AAE/C,SACEC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,QACT,oCAAoC;AAC3C,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,OAAO,QAAQ,uCAAuC;AAE/D,OAAOC,MAAM,MAAM,WAAW;AAE9B,MAAMC,UAAoB,GAAGA,CAAA,KAAM;EACjC,MAAM;IAAEC,WAAW;IAAEC;EAAgB,CAAC,GAAGhB,UAAU,CAACW,aAAa,CAAC;EAClE,MAAM,CAACM,aAAa,EAAEC,gBAAgB,CAAC,GAAGjB,QAAQ,CAChD,CAAC,CACH,CAAC;EAED,MAAMkB,SAAS,GAAGH,eAAe,CAACG,SAAS;EAC3C,MAAMC,YAAY,GAAGJ,eAAe,CAACK,sBAAsB;EAC3D,MAAMC,UAAU,GAAG,CAAC,EAAEH,SAAS,IAAIC,YAAY,CAAC;EAEhD,MAAMG,kBAAkB,GA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AAC1B,aAAa,CAACE,SAAS,CAACyB,EAAE,CAAE;IACxCC,cAAc,EAAEA,CAAA,KAAMtB,kBAAkB,CAACJ,SAAS,CAACyB,EAAE,CAAE;IACvDE,SAAS,EAAEpB;EAAc,CAC1B,CACG,CAAC,GACL,IAAI,EACPN,YAAY,gBACXtB,KAAA,CAAA8B,aAAA,CAACzB,IAAI;IAAC0B,KAAK,EAAEhB,MAAM,CAAC0B;EAAY,gBAC9BzC,KAAA,CAAA8B,aAAA,CAACtB,YAAY;IAAC6B,KAAK,EAAEzB,cAAc,CAACqC;EAAc,CAAE,CAAC,eACrDjD,KAAA,CAAA8B,aAAA,CAACvB,cAAc;IACboC,IAAI,EAAErB,YAAa;IACnBsB,OAAO,EAAC,QAAQ;IAChBC,QAAQ,EAAE,CAAC,CAAC1B,aAAa,CAACG,YAAY,CAACwB,EAAE,CAAE;IAC3CC,cAAc,EAAEA,CAAA,KAAMtB,kBAAkB,CAACH,YAAY,CAACwB,EAAE;EAAE,CAC3D,CACG,CAAC,GACL,IAAI,EACP,CAACtB,UAAU,gBACVxB,KAAA,CAAA8B,aAAA,CAACrB,SAAS;IAACyC,KAAK,EAAEvC,gBAAiB;IAACwC,QAAQ,EAAEzC;EAAoB,CAAE,CAAC,GACnE,IACM,CAAC;AAEjB,CAAC;AAED,eAAeM,UAAU"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useCallback, useContext, useEffect } from 'react';
|
|
2
|
+
import { ActivityIndicator, FlatList, RefreshControl, View } from 'react-native';
|
|
3
|
+
import BucketRow from '../components/BucketRow';
|
|
4
|
+
import SectionLabel from '../components/SectionLabel';
|
|
5
|
+
import StateCard from '../components/StateCard';
|
|
6
|
+
import { EMPTY_BUCKETS_SUBTITLE, EMPTY_BUCKETS_TITLE, EMPTY_ERROR_MESSAGE, GENERIC_ERROR_TITLE, IS_ANDROID, SECTION_LABELS } from '../../../../constants/appConstants';
|
|
7
|
+
import { DS_COLORS } from '../../../../constants/designTokens';
|
|
8
|
+
import { GlobalContext } from '../../../../state';
|
|
9
|
+
import styles from '../styles';
|
|
10
|
+
const Separator = () => /*#__PURE__*/React.createElement(View, {
|
|
11
|
+
style: styles.cardSeparator
|
|
12
|
+
});
|
|
13
|
+
const TestingBuckets = () => {
|
|
14
|
+
const {
|
|
15
|
+
bucketState,
|
|
16
|
+
actions: {
|
|
17
|
+
fetchBuckets,
|
|
18
|
+
selectBucket
|
|
19
|
+
}
|
|
20
|
+
} = useContext(GlobalContext);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!bucketState.data) {
|
|
23
|
+
fetchBuckets();
|
|
24
|
+
}
|
|
25
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26
|
+
}, []);
|
|
27
|
+
const handleBucketPress = useCallback(bucketId => {
|
|
28
|
+
requestAnimationFrame(() => selectBucket(bucketId));
|
|
29
|
+
}, [selectBucket]);
|
|
30
|
+
const renderItem = useCallback(_ref => {
|
|
31
|
+
let {
|
|
32
|
+
item
|
|
33
|
+
} = _ref;
|
|
34
|
+
return /*#__PURE__*/React.createElement(BucketRow, {
|
|
35
|
+
id: item.id,
|
|
36
|
+
name: item.name,
|
|
37
|
+
updatedAt: item.updatedAt,
|
|
38
|
+
latestVersion: (IS_ANDROID ? item.latestAndroidBundleVersion : item.latestIosBundleVersion) || 0,
|
|
39
|
+
onPress: handleBucketPress
|
|
40
|
+
});
|
|
41
|
+
}, [handleBucketPress]);
|
|
42
|
+
const buckets = bucketState.data || [];
|
|
43
|
+
if (bucketState.isLoading && !buckets.length) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
45
|
+
style: styles.centeredFill
|
|
46
|
+
}, /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
47
|
+
color: DS_COLORS.indigo
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
if (!buckets.length) {
|
|
51
|
+
const isEmpty = bucketState.error === EMPTY_ERROR_MESSAGE;
|
|
52
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
53
|
+
style: styles.screenPadding
|
|
54
|
+
}, /*#__PURE__*/React.createElement(SectionLabel, {
|
|
55
|
+
label: SECTION_LABELS.BUCKETS
|
|
56
|
+
}), /*#__PURE__*/React.createElement(StateCard, {
|
|
57
|
+
title: isEmpty ? EMPTY_BUCKETS_TITLE : GENERIC_ERROR_TITLE,
|
|
58
|
+
subtitle: isEmpty ? EMPTY_BUCKETS_SUBTITLE : bucketState.error || undefined,
|
|
59
|
+
onRetry: fetchBuckets
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/React.createElement(FlatList, {
|
|
63
|
+
style: styles.content,
|
|
64
|
+
contentContainerStyle: styles.screenPadding,
|
|
65
|
+
data: buckets,
|
|
66
|
+
keyExtractor: item => item.id,
|
|
67
|
+
renderItem: renderItem,
|
|
68
|
+
ItemSeparatorComponent: Separator,
|
|
69
|
+
ListHeaderComponent: /*#__PURE__*/React.createElement(SectionLabel, {
|
|
70
|
+
label: SECTION_LABELS.BUCKETS
|
|
71
|
+
}),
|
|
72
|
+
refreshControl: /*#__PURE__*/React.createElement(RefreshControl, {
|
|
73
|
+
refreshing: bucketState.isLoading,
|
|
74
|
+
onRefresh: fetchBuckets,
|
|
75
|
+
tintColor: DS_COLORS.indigo,
|
|
76
|
+
colors: [DS_COLORS.indigo]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
export default TestingBuckets;
|
|
81
|
+
//# sourceMappingURL=TestingBuckets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useContext","useEffect","ActivityIndicator","FlatList","RefreshControl","View","BucketRow","SectionLabel","StateCard","EMPTY_BUCKETS_SUBTITLE","EMPTY_BUCKETS_TITLE","EMPTY_ERROR_MESSAGE","GENERIC_ERROR_TITLE","IS_ANDROID","SECTION_LABELS","DS_COLORS","GlobalContext","styles","Separator","createElement","style","cardSeparator","TestingBuckets","bucketState","actions","fetchBuckets","selectBucket","data","handleBucketPress","bucketId","requestAnimationFrame","renderItem","_ref","item","id","name","updatedAt","latestVersion","latestAndroidBundleVersion","latestIosBundleVersion","onPress","buckets","isLoading","length","centeredFill","color","indigo","isEmpty","error","screenPadding","label","BUCKETS","title","subtitle","undefined","onRetry","content","contentContainerStyle","keyExtractor","ItemSeparatorComponent","ListHeaderComponent","refreshControl","refreshing","onRefresh","tintColor","colors"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/devMenu/screens/TestingBuckets.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACjE,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,cAAc,EACdC,IAAI,QACC,cAAc;AAErB,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,OAAOC,YAAY,MAAM,4BAA4B;AACrD,OAAOC,SAAS,MAAM,yBAAyB;AAE/C,SACEC,sBAAsB,EACtBC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB,EACnBC,UAAU,EACVC,cAAc,QACT,oCAAoC;AAC3C,SAASC,SAAS,QAAQ,oCAAoC;AAC9D,SAASC,aAAa,QAAQ,mBAAmB;AAGjD,OAAOC,MAAM,MAAM,WAAW;AAE9B,MAAMC,SAAmB,GAAGA,CAAA,kBAAMpB,KAAA,CAAAqB,aAAA,CAACd,IAAI;EAACe,KAAK,EAAEH,MAAM,CAACI;AAAc,CAAE,CAAC;AAEvE,MAAMC,cAAwB,GAAGA,CAAA,KAAM;EACrC,MAAM;IACJC,WAAW;IACXC,OAAO,EAAE;MAAEC,YAAY;MAAEC;IAAa;EACxC,CAAC,GAAG1B,UAAU,CAACgB,aAAa,CAAC;EAE7Bf,SAAS,CAAC,MAAM;IACd,IAAI,CAACsB,WAAW,CAACI,IAAI,EAAE;MACrBF,YAAY,CAAC,CAAC;IAChB;IACA;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,iBAAiB,GA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AS;MACR4C,KAAK,EAAEL,OAAO,GAAGrC,mBAAmB,GAAGE,mBAAoB;MAC3DyC,QAAQ,EACNN,OAAO,GAAGtC,sBAAsB,GAAGc,WAAW,CAACyB,KAAK,IAAIM,SACzD;MACDC,OAAO,EAAE9B;IAAa,CACvB,CACG,CAAC;EAEX;EAEA,oBACE3B,KAAA,CAAAqB,aAAA,CAAChB,QAAQ;IACPiB,KAAK,EAAEH,MAAM,CAACuC,OAAQ;IACtBC,qBAAqB,EAAExC,MAAM,CAACgC,aAAc;IAC5CtB,IAAI,EAAEc,OAAQ;IACdiB,YAAY,EAAGzB,IAAI,IAAKA,IAAI,CAACC,EAAG;IAChCH,UAAU,EAAEA,UAAW;IACvB4B,sBAAsB,EAAEzC,SAAU;IAClC0C,mBAAmB,eAAE9D,KAAA,CAAAqB,aAAA,CAACZ,YAAY;MAAC2C,KAAK,EAAEpC,cAAc,CAACqC;IAAQ,CAAE,CAAE;IACrEU,cAAc,eACZ/D,KAAA,CAAAqB,aAAA,CAACf,cAAc;MACb0D,UAAU,EAAEvC,WAAW,CAACmB,SAAU;MAClCqB,SAAS,EAAEtC,YAAa;MACxBuC,SAAS,EAAEjD,SAAS,CAAC+B,MAAO;MAC5BmB,MAAM,EAAE,CAAClD,SAAS,CAAC+B,MAAM;IAAE,CAC5B;EACF,CACF,CAAC;AAEN,CAAC;AAED,eAAexB,cAAc"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { DS_COLORS, DS_SPACING } from '../../../constants/designTokens';
|
|
3
|
+
const styles = StyleSheet.create({
|
|
4
|
+
root: {
|
|
5
|
+
flex: 1,
|
|
6
|
+
backgroundColor: DS_COLORS.screenBg
|
|
7
|
+
},
|
|
8
|
+
headerSafeArea: {
|
|
9
|
+
backgroundColor: DS_COLORS.cardBg
|
|
10
|
+
},
|
|
11
|
+
// The wordmark header and the mode toggle share one slab; only the slab's
|
|
12
|
+
// bottom edge carries the hairline.
|
|
13
|
+
toggleArea: {
|
|
14
|
+
paddingHorizontal: DS_SPACING.screen,
|
|
15
|
+
paddingBottom: 18,
|
|
16
|
+
borderBottomWidth: 1,
|
|
17
|
+
paddingTop: DS_SPACING.cardGap,
|
|
18
|
+
borderBottomColor: DS_COLORS.headerHairline
|
|
19
|
+
},
|
|
20
|
+
content: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
backgroundColor: DS_COLORS.contentBg
|
|
23
|
+
},
|
|
24
|
+
screenPadding: {
|
|
25
|
+
padding: DS_SPACING.screen
|
|
26
|
+
},
|
|
27
|
+
cardSeparator: {
|
|
28
|
+
height: DS_SPACING.cardGap
|
|
29
|
+
},
|
|
30
|
+
section: {
|
|
31
|
+
marginBottom: DS_SPACING.section
|
|
32
|
+
},
|
|
33
|
+
sectionLast: {
|
|
34
|
+
marginBottom: 0
|
|
35
|
+
},
|
|
36
|
+
bannerWrapper: {
|
|
37
|
+
paddingHorizontal: DS_SPACING.screen,
|
|
38
|
+
paddingTop: DS_SPACING.cardGap
|
|
39
|
+
},
|
|
40
|
+
centeredFill: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center'
|
|
44
|
+
},
|
|
45
|
+
listFooter: {
|
|
46
|
+
paddingVertical: DS_SPACING.cardGap
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export default styles;
|
|
50
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","DS_COLORS","DS_SPACING","styles","create","root","flex","backgroundColor","screenBg","headerSafeArea","cardBg","toggleArea","paddingHorizontal","screen","paddingBottom","borderBottomWidth","paddingTop","cardGap","borderBottomColor","headerHairline","content","contentBg","screenPadding","padding","cardSeparator","height","section","marginBottom","sectionLast","bannerWrapper","centeredFill","alignItems","justifyContent","listFooter","paddingVertical"],"sourceRoot":"../../../../../../src","sources":["main/components/modules/devMenu/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,SAAS,EAAEC,UAAU,QAAQ,iCAAiC;AAEvE,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,IAAI,EAAE;IACJC,IAAI,EAAE,CAAC;IACPC,eAAe,EAAEN,SAAS,CAACO;EAC7B,CAAC;EACDC,cAAc,EAAE;IACdF,eAAe,EAAEN,SAAS,CAACS;EAC7B,CAAC;EACD;EACA;EACAC,UAAU,EAAE;IACVC,iBAAiB,EAAEV,UAAU,CAACW,MAAM;IACpCC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,CAAC;IACpBC,UAAU,EAAEd,UAAU,CAACe,OAAO;IAC9BC,iBAAiB,EAAEjB,SAAS,CAACkB;EAC/B,CAAC;EACDC,OAAO,EAAE;IACPd,IAAI,EAAE,CAAC;IACPC,eAAe,EAAEN,SAAS,CAACoB;EAC7B,CAAC;EACDC,aAAa,EAAE;IACbC,OAAO,EAAErB,UAAU,CAACW;EACtB,CAAC;EACDW,aAAa,EAAE;IACbC,MAAM,EAAEvB,UAAU,CAACe;EACrB,CAAC;EACDS,OAAO,EAAE;IACPC,YAAY,EAAEzB,UAAU,CAACwB;EAC3B,CAAC;EACDE,WAAW,EAAE;IACXD,YAAY,EAAE;EAChB,CAAC;EACDE,aAAa,EAAE;IACbjB,iBAAiB,EAAEV,UAAU,CAACW,MAAM;IACpCG,UAAU,EAAEd,UAAU,CAACe;EACzB,CAAC;EACDa,YAAY,EAAE;IACZxB,IAAI,EAAE,CAAC;IACPyB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDC,UAAU,EAAE;IACVC,eAAe,EAAEhC,UAAU,CAACe;EAC9B;AACF,CAAC,CAAC;AAEF,eAAed,MAAM"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import { Modal, SafeAreaView, StyleSheet
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import Footer from '../../../components/common/Footer';
|
|
6
|
-
import { HEADER_TITLE } from '../../../constants/appConstants';
|
|
7
|
-
import { COLORS } from '../../../constants/colors';
|
|
8
|
-
import Listing from '../listing';
|
|
9
|
-
import useStallionModal from './hooks/useStallionModal';
|
|
10
|
-
import OverlayLoader from '../../../components/common/OverlayLoader';
|
|
11
|
-
import { SWITCH_STATES } from '../../../../types/meta.types';
|
|
12
|
-
import Prod from '../prod';
|
|
1
|
+
import React, { useCallback, useContext } from 'react';
|
|
2
|
+
import { Modal, SafeAreaView, StyleSheet } from 'react-native';
|
|
3
|
+
import StallionDevMenu from '../../StallionDevMenu';
|
|
4
|
+
import { DS_COLORS } from '../../../constants/designTokens';
|
|
13
5
|
import { GlobalContext } from '../../../state';
|
|
14
6
|
const StallionModal = () => {
|
|
15
7
|
const {
|
|
@@ -18,52 +10,24 @@ const StallionModal = () => {
|
|
|
18
10
|
setIsModalVisible
|
|
19
11
|
}
|
|
20
12
|
} = useContext(GlobalContext);
|
|
13
|
+
const onClosePress = useCallback(() => {
|
|
14
|
+
requestAnimationFrame(() => setIsModalVisible(false));
|
|
15
|
+
}, [setIsModalVisible]);
|
|
21
16
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
22
|
-
transparent: true,
|
|
23
17
|
animationType: "slide",
|
|
18
|
+
presentationStyle: "fullScreen",
|
|
24
19
|
visible: isModalVisible,
|
|
25
20
|
onRequestClose: () => setIsModalVisible(false)
|
|
26
|
-
}, isModalVisible ? /*#__PURE__*/React.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onClosePress,
|
|
32
|
-
loginRequired,
|
|
33
|
-
isBackEnabled,
|
|
34
|
-
isDownloading,
|
|
35
|
-
downloadProgress,
|
|
36
|
-
metaState,
|
|
37
|
-
downloadError,
|
|
38
|
-
handleSwitch,
|
|
39
|
-
internalIsRestartRequired
|
|
40
|
-
} = useStallionModal();
|
|
41
|
-
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
42
|
-
style: styles.container
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Header, {
|
|
44
|
-
title: loginRequired ? null : HEADER_TITLE,
|
|
45
|
-
onClosePress: onClosePress,
|
|
46
|
-
onBackPress: isBackEnabled ? onBackPress : null
|
|
47
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
48
|
-
style: styles.listingSection
|
|
49
|
-
}, loginRequired ? /*#__PURE__*/React.createElement(Login, null) : metaState.switchState === SWITCH_STATES.STAGE ? /*#__PURE__*/React.createElement(Listing, null) : /*#__PURE__*/React.createElement(Prod, null), isDownloading && /*#__PURE__*/React.createElement(OverlayLoader, {
|
|
50
|
-
currentDownloadFraction: downloadProgress
|
|
51
|
-
})), loginRequired ? null : /*#__PURE__*/React.createElement(Footer, {
|
|
52
|
-
switchIsOn: metaState.switchState === SWITCH_STATES.STAGE,
|
|
53
|
-
onSwitchToggle: handleSwitch,
|
|
54
|
-
errorMessage: downloadError,
|
|
55
|
-
isRestartRequired: internalIsRestartRequired
|
|
56
|
-
}));
|
|
21
|
+
}, isModalVisible ? /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
22
|
+
style: styles.safeArea
|
|
23
|
+
}, /*#__PURE__*/React.createElement(StallionDevMenu, {
|
|
24
|
+
onClosePress: onClosePress
|
|
25
|
+
})) : null);
|
|
57
26
|
};
|
|
58
27
|
const styles = StyleSheet.create({
|
|
59
|
-
|
|
28
|
+
safeArea: {
|
|
60
29
|
flex: 1,
|
|
61
|
-
|
|
62
|
-
alignContent: 'center',
|
|
63
|
-
backgroundColor: COLORS.white
|
|
64
|
-
},
|
|
65
|
-
listingSection: {
|
|
66
|
-
flex: 1
|
|
30
|
+
backgroundColor: DS_COLORS.screenBg
|
|
67
31
|
}
|
|
68
32
|
});
|
|
69
33
|
export default StallionModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","Modal","SafeAreaView","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useContext","Modal","SafeAreaView","StyleSheet","StallionDevMenu","DS_COLORS","GlobalContext","StallionModal","isModalVisible","actions","setIsModalVisible","onClosePress","requestAnimationFrame","createElement","animationType","presentationStyle","visible","onRequestClose","style","styles","safeArea","create","flex","backgroundColor","screenBg"],"sourceRoot":"../../../../../../src","sources":["main/components/modules/modal/StallionModal.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AACtD,SAASC,KAAK,EAAEC,YAAY,EAAEC,UAAU,QAAQ,cAAc;AAE9D,OAAOC,eAAe,MAAM,uBAAuB;AACnD,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,aAAa,QAAQ,gBAAgB;AAE9C,MAAMC,aAAuB,GAAGA,CAAA,KAAM;EACpC,MAAM;IACJC,cAAc;IACdC,OAAO,EAAE;MAAEC;IAAkB;EAC/B,CAAC,GAAGV,UAAU,CAACM,aAAa,CAAC;EAE7B,MAAMK,YAAY,GAAGZ,WAAW,CAAC,MAAM;IACrCa,qBAAqB,CAAC,MAAMF,iBAAiB,CAAC,KAAK,CAAC,CAAC;EACvD,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,oBACEZ,KAAA,CAAAe,aAAA,CAACZ,KAAK;IACJa,aAAa,EAAC,OAAO;IACrBC,iBAAiB,EAAC,YAAY;IAC9BC,OAAO,EAAER,cAAe;IACxBS,cAAc,EAAEA,CAAA,KAAMP,iBAAiB,CAAC,KAAK;EAAE,GAE9CF,cAAc,gBACbV,KAAA,CAAAe,aAAA,CAACX,YAAY;IAACgB,KAAK,EAAEC,MAAM,CAACC;EAAS,gBACnCtB,KAAA,CAAAe,aAAA,CAACT,eAAe;IAACO,YAAY,EAAEA;EAAa,CAAE,CAClC,CAAC,GACb,IACC,CAAC;AAEZ,CAAC;AAED,MAAMQ,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAC/BD,QAAQ,EAAE;IACRE,IAAI,EAAE,CAAC;IACPC,eAAe,EAAElB,SAAS,CAACmB;EAC7B;AACF,CAAC,CAAC;AAEF,eAAejB,aAAa"}
|
|
@@ -2,12 +2,13 @@ import { useCallback, useContext, useMemo } from 'react';
|
|
|
2
2
|
import { GlobalContext } from '../../../../state';
|
|
3
3
|
import { toggleStallionSwitchNative } from '../../../../utils/StallionNativeUtils';
|
|
4
4
|
import { SWITCH_STATES } from '../../../../../types/meta.types';
|
|
5
|
+
import { BUNDLE_COUNT_SUFFIX, BUNDLE_COUNT_SUFFIX_SINGULAR, IS_ANDROID, META_SEPARATOR, SWITCH_TEXTS, VERSION_PREFIX } from '../../../../constants/appConstants';
|
|
5
6
|
const useStallionModal = () => {
|
|
6
|
-
var _downloadState$data2;
|
|
7
7
|
const {
|
|
8
8
|
isModalVisible,
|
|
9
9
|
configState,
|
|
10
10
|
metaState,
|
|
11
|
+
bucketState,
|
|
11
12
|
bundleState,
|
|
12
13
|
downloadState,
|
|
13
14
|
actions: {
|
|
@@ -24,14 +25,20 @@ const useStallionModal = () => {
|
|
|
24
25
|
requestAnimationFrame(() => setIsModalVisible(false));
|
|
25
26
|
}, [setIsModalVisible]);
|
|
26
27
|
const loginRequired = configState !== null && configState !== void 0 && configState.sdkToken ? false : true;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
34
|
-
}, [
|
|
28
|
+
const isTesting = (metaState === null || metaState === void 0 ? void 0 : metaState.switchState) === SWITCH_STATES.STAGE;
|
|
29
|
+
|
|
30
|
+
/** Bundle history is a Testing-only push over the buckets list. */
|
|
31
|
+
const isBundleHistory = useMemo(() => isTesting && !!bundleState.selectedBucketId, [isTesting, bundleState.selectedBucketId]);
|
|
32
|
+
const selectedBucket = useMemo(() => {
|
|
33
|
+
var _bucketState$data;
|
|
34
|
+
return ((_bucketState$data = bucketState.data) === null || _bucketState$data === void 0 ? void 0 : _bucketState$data.find(bucket => bucket.id === bundleState.selectedBucketId)) || null;
|
|
35
|
+
}, [bucketState.data, bundleState.selectedBucketId]);
|
|
36
|
+
const bucketTitle = (selectedBucket === null || selectedBucket === void 0 ? void 0 : selectedBucket.name) || '';
|
|
37
|
+
const bucketSubtitle = useMemo(() => {
|
|
38
|
+
if (!selectedBucket) return SWITCH_TEXTS.ON;
|
|
39
|
+
const latestVersion = (IS_ANDROID ? selectedBucket.latestAndroidBundleVersion : selectedBucket.latestIosBundleVersion) || 0;
|
|
40
|
+
return [SWITCH_TEXTS.ON, `${VERSION_PREFIX}${latestVersion}`, `${latestVersion}${latestVersion === 1 ? BUNDLE_COUNT_SUFFIX_SINGULAR : BUNDLE_COUNT_SUFFIX}`].join(META_SEPARATOR);
|
|
41
|
+
}, [selectedBucket]);
|
|
35
42
|
const downloadError = useMemo(() => downloadState.error, [downloadState.error]);
|
|
36
43
|
const handleSwitch = useCallback(newSwitchStatus => {
|
|
37
44
|
setDownloadErrorMessage('');
|
|
@@ -41,22 +48,17 @@ const useStallionModal = () => {
|
|
|
41
48
|
selectBucket();
|
|
42
49
|
}
|
|
43
50
|
}, [refreshMeta, selectBucket, setDownloadErrorMessage]);
|
|
44
|
-
const internalIsRestartRequired = useMemo(() => {
|
|
45
|
-
var _metaState$prodSlot, _metaState$stageSlot;
|
|
46
|
-
return metaState.switchState === SWITCH_STATES.PROD && (_metaState$prodSlot = metaState.prodSlot) !== null && _metaState$prodSlot !== void 0 && _metaState$prodSlot.tempHash || metaState.switchState === SWITCH_STATES.STAGE && (_metaState$stageSlot = metaState.stageSlot) !== null && _metaState$stageSlot !== void 0 && _metaState$stageSlot.tempHash ? true : false;
|
|
47
|
-
}, [metaState]);
|
|
48
51
|
return {
|
|
49
52
|
isModalVisible,
|
|
50
53
|
onBackPress,
|
|
51
54
|
onClosePress,
|
|
52
55
|
loginRequired,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
isTesting,
|
|
57
|
+
isBundleHistory,
|
|
58
|
+
bucketTitle,
|
|
59
|
+
bucketSubtitle,
|
|
57
60
|
downloadError,
|
|
58
|
-
handleSwitch
|
|
59
|
-
internalIsRestartRequired
|
|
61
|
+
handleSwitch
|
|
60
62
|
};
|
|
61
63
|
};
|
|
62
64
|
export default useStallionModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","useMemo","GlobalContext","toggleStallionSwitchNative","SWITCH_STATES","
|
|
1
|
+
{"version":3,"names":["useCallback","useContext","useMemo","GlobalContext","toggleStallionSwitchNative","SWITCH_STATES","BUNDLE_COUNT_SUFFIX","BUNDLE_COUNT_SUFFIX_SINGULAR","IS_ANDROID","META_SEPARATOR","SWITCH_TEXTS","VERSION_PREFIX","useStallionModal","isModalVisible","configState","metaState","bucketState","bundleState","downloadState","actions","setIsModalVisible","selectBucket","refreshMeta","setDownloadErrorMessage","onBackPress","requestAnimationFrame","onClosePress","loginRequired","sdkToken","isTesting","switchState","STAGE","isBundleHistory","selectedBucketId","selectedBucket","_bucketState$data","data","find","bucket","id","bucketTitle","name","bucketSubtitle","ON","latestVersion","latestAndroidBundleVersion","latestIosBundleVersion","join","downloadError","error","handleSwitch","newSwitchStatus","PROD"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/modal/hooks/useStallionModal.ts"],"mappings":"AAAA,SAASA,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAExD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,0BAA0B,QAAQ,uCAAuC;AAClF,SAASC,aAAa,QAAQ,iCAAiC;AAC/D,SACEC,mBAAmB,EACnBC,4BAA4B,EAC5BC,UAAU,EACVC,cAAc,EACdC,YAAY,EACZC,cAAc,QACT,oCAAoC;AAE3C,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EAC7B,MAAM;IACJC,cAAc;IACdC,WAAW;IACXC,SAAS;IACTC,WAAW;IACXC,WAAW;IACXC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,OAAO,CAAS,MAAM;IAC3C,IAAI,CAACgC,cAAc,EAAE,OAAOxB,YAAY,CAACiC,EAAE;IAC3C,MAAMC,aAAa,GACjB,CAACpC,UAAU,GACP0B,cAAc,CAACW,0BAA0B,GACzCX,cAAc,CAACY,sBAAsB,KAAK,CAAC;IACjD,OAAO,CACLpC,YAAY,CAACiC,EAAE,EACd,GAAEhC,cAAe,GAAEiC,aAAc,EAAC,EAClC,GAAEA,aAAc,GACfA,aAAa,KAAK,CAAC,GAAGrC,4BAA4B,GAAGD,mBACtD,EAAC,CACH,CAACyC,IAAI,CAACtC,cAAc,CAAC;EACxB,CAAC,EAAE,CAACyB,cAAc,CAAC,CAAC;EAEpB,MAAMc,aAAa,GAAG9C,OAAO,CAC3B,MAAMgB,aAAa,CAAC+B,KAAK,EACzB,CAAC/B,aAAa,CAAC+B,KAAK,CACtB,CAAC;EAED,MAAMC,YAAY,GAAGlD,WAAW,CAC7BmD,eAAwB,IAAK;IAC5B5B,uBAAuB,CAAC,EAAE,CAAC;IAC3BnB,0BAA0B,CACxB+C,eAAe,GAAG9C,aAAa,CAAC0B,KAAK,GAAG1B,aAAa,CAAC+C,IACxD,CAAC;IACD9B,WAAW,CAAC,CAAC;IACb,IAAI,CAAC6B,eAAe,EAAE;MACpB9B,YAAY,CAAC,CAAC;IAChB;EACF,CAAC,EACD,CAACC,WAAW,EAAED,YAAY,EAAEE,uBAAuB,CACrD,CAAC;EAED,OAAO;IACLV,cAAc;IACdW,WAAW;IACXE,YAAY;IACZC,aAAa;IACbE,SAAS;IACTG,eAAe;IACfQ,WAAW;IACXE,cAAc;IACdM,aAAa;IACbE;EACF,CAAC;AACH,CAAC;AAED,eAAetC,gBAAgB"}
|
|
@@ -1,55 +1,24 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
export const HEADER_TITLE = 'Stallion';
|
|
3
3
|
export const Login_TITLE = 'Login to continue';
|
|
4
|
-
export const PROFILE_TITLE = 'Profile';
|
|
5
4
|
export const HEADER_SLAB_HEIGHT = 50;
|
|
6
5
|
export const STD_MARGIN = HEADER_SLAB_HEIGHT / 5;
|
|
7
6
|
export const END_REACH_THRESHOLD = 0;
|
|
8
7
|
export const DOWNLOAD_BUTTON_TEXT = 'Download';
|
|
9
|
-
export const DOWNLOADED_TEXT = 'Downloaded';
|
|
10
|
-
export const APPLIED_TEXT = 'Applied';
|
|
11
|
-
export const LOGOUT_BUTTON_TEXT = 'Logout';
|
|
12
|
-
export const FOOTER_INFO_TITLE = 'Active Bucket: ';
|
|
13
|
-
export const FOOTER_INFO_SUBTITLE = 'Version: ';
|
|
14
8
|
export let SWITCH_TEXTS = /*#__PURE__*/function (SWITCH_TEXTS) {
|
|
15
|
-
SWITCH_TEXTS["ON"] = "Testing";
|
|
16
|
-
SWITCH_TEXTS["OFF"] = "Production";
|
|
9
|
+
SWITCH_TEXTS["ON"] = "Testing Mode";
|
|
10
|
+
SWITCH_TEXTS["OFF"] = "Production Mode";
|
|
17
11
|
return SWITCH_TEXTS;
|
|
18
12
|
}({});
|
|
19
|
-
export let FOOTER_SUB_TEXTS = /*#__PURE__*/function (FOOTER_SUB_TEXTS) {
|
|
20
|
-
FOOTER_SUB_TEXTS["PROD"] = "User facing version";
|
|
21
|
-
FOOTER_SUB_TEXTS["STAGE"] = "Internal sharing version";
|
|
22
|
-
return FOOTER_SUB_TEXTS;
|
|
23
|
-
}({});
|
|
24
|
-
export const SWITCH_TITLE = 'Switch ';
|
|
25
|
-
export const BUCKET_CARD_UPDATED_TEXT = 'Updated at: ';
|
|
26
|
-
export const BUCKET_CARD_BUNDLE_COUNT_TEXT = 'Bundles: ';
|
|
27
|
-
export const BUCKET_CARD_AUTHOR_TEXT = 'Author: ';
|
|
28
|
-
export const BUNDLE_CARD_RELEASE_NOTE = 'Release Note: ';
|
|
29
|
-
export const BUNDLE_CARD_AUTHOR = 'Author';
|
|
30
|
-
export const DOWNLOAD_PROGRESS_EVENT = 'StallionDownloadProgress';
|
|
31
13
|
export const DEFAULT_ERROR_MESSAGE = 'Something went wrong. Check your network connection';
|
|
32
14
|
export const EMPTY_ERROR_MESSAGE = 'No buckets found';
|
|
33
15
|
export const EMPTY_ERROR_MESSAGE_BUNDLE = 'No bundles found';
|
|
34
|
-
export const EMPTY_DOWNLOAD_MESSAGE = 'No bundle is downloaded yet';
|
|
35
16
|
export const DEFAULT_ERROR_PREFIX = 'Error: ';
|
|
36
17
|
export const VERSION_PREFIX = 'V';
|
|
37
18
|
export const RETRY_BUTTON_TEXT = 'Retry';
|
|
38
19
|
export const CURRENT_PLATFORM = Platform.OS;
|
|
39
20
|
export const IS_ANDROID = CURRENT_PLATFORM === 'android';
|
|
40
21
|
export const KEYBOARD_AVOIDING_BEHAVIOUR = IS_ANDROID ? 'height' : 'padding';
|
|
41
|
-
export let LOGIN_PAGE_KEYS = /*#__PURE__*/function (LOGIN_PAGE_KEYS) {
|
|
42
|
-
LOGIN_PAGE_KEYS["email"] = "Email";
|
|
43
|
-
LOGIN_PAGE_KEYS["password"] = "Password";
|
|
44
|
-
return LOGIN_PAGE_KEYS;
|
|
45
|
-
}({});
|
|
46
|
-
export let CARD_TYPES = /*#__PURE__*/function (CARD_TYPES) {
|
|
47
|
-
CARD_TYPES["BUNDLE"] = "BUNDLE";
|
|
48
|
-
CARD_TYPES["BUCKET"] = "BUCKET";
|
|
49
|
-
return CARD_TYPES;
|
|
50
|
-
}({});
|
|
51
|
-
export const BUNDLE_APPLIED_TEXT = 'Applied';
|
|
52
|
-
export const DOWNLOADING_TEXT = 'Downloading';
|
|
53
22
|
export const EMPTY_STATE = {
|
|
54
23
|
data: null,
|
|
55
24
|
isLoading: false,
|
|
@@ -57,30 +26,11 @@ export const EMPTY_STATE = {
|
|
|
57
26
|
};
|
|
58
27
|
export const PIN_LENGTH = 6;
|
|
59
28
|
export const SUBMIT_BUTTON_TEXT = 'Continue';
|
|
60
|
-
export const PIN_BACK_BUTTON_TEXT = 'BACK';
|
|
61
29
|
export const PIN_INPUT_KEY = 'Enter PIN';
|
|
62
30
|
export const NOT_APPLICABLE_TEXT = 'N/A';
|
|
63
|
-
export let BUCKET_CARD_TEXTS = /*#__PURE__*/function (BUCKET_CARD_TEXTS) {
|
|
64
|
-
BUCKET_CARD_TEXTS["DOWNLOADED"] = "Downloaded";
|
|
65
|
-
BUCKET_CARD_TEXTS["APPLIED"] = "Applied";
|
|
66
|
-
BUCKET_CARD_TEXTS["VERSION"] = "Version";
|
|
67
|
-
BUCKET_CARD_TEXTS["BUNDLES"] = "Bundles";
|
|
68
|
-
BUCKET_CARD_TEXTS["UPDATED"] = "Updated";
|
|
69
|
-
return BUCKET_CARD_TEXTS;
|
|
70
|
-
}({});
|
|
71
|
-
export let SWITCH_STATE_KEYS = /*#__PURE__*/function (SWITCH_STATE_KEYS) {
|
|
72
|
-
SWITCH_STATE_KEYS["Enabled"] = "True";
|
|
73
|
-
SWITCH_STATE_KEYS["Disabled"] = "False";
|
|
74
|
-
return SWITCH_STATE_KEYS;
|
|
75
|
-
}({});
|
|
76
|
-
export const NO_RELEASE_NOTE_TEXT = 'No release note provided';
|
|
77
31
|
export const STALLION_LOGO_URL = 'https://d2shjbuzwp1rpv.cloudfront.net/stallion_logo.png';
|
|
78
32
|
export const STALLION_EB_INFO = 'A crash occurred in the app. We have switched Stallion off. Check crash report below. Continue crash to invoke other exception handlers.';
|
|
79
33
|
export const STALLION_EB_BTN_TXT = 'Continue Crash';
|
|
80
|
-
export const DOWNLOAD_ALERT_HEADER = 'Download Successful';
|
|
81
|
-
export const DOWNLOAD_ALERT_SWITCH_MESSAGE = 'Stallion has been switched on. ';
|
|
82
|
-
export const DOWNLOAD_ALERT_MESSAGE = 'Restart the app for changes to take effect.';
|
|
83
|
-
export const DOWNLOAD_ALERT_BUTTON = 'Ok';
|
|
84
34
|
export let NATIVE_CONSTANTS = /*#__PURE__*/function (NATIVE_CONSTANTS) {
|
|
85
35
|
NATIVE_CONSTANTS["SDK_TOKEN"] = "x-sdk-access-token";
|
|
86
36
|
NATIVE_CONSTANTS["APP_TOKEN"] = "x-app-token";
|
|
@@ -116,6 +66,59 @@ export let NativeEventTypesStage = /*#__PURE__*/function (NativeEventTypesStage)
|
|
|
116
66
|
return NativeEventTypesStage;
|
|
117
67
|
}({});
|
|
118
68
|
export const STALLION_NATIVE_EVENT = 'STALLION_NATIVE_EVENT';
|
|
119
|
-
export const RESTART_REQUIRED_MESSAGE = 'Bundle change detected. Click to restart app.';
|
|
120
69
|
export const DEFAULT_STALLION_PARAMS = {};
|
|
70
|
+
|
|
71
|
+
/* ------------------------------------------------------------------ *
|
|
72
|
+
* Dev menu copy
|
|
73
|
+
* ------------------------------------------------------------------ */
|
|
74
|
+
|
|
75
|
+
export const WORDMARK_TEXT = 'STALLION';
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Captions name the mode the switch would move to, not the one it is in — the
|
|
79
|
+
* label above already states that. Flipping the switch only records the choice;
|
|
80
|
+
* the app keeps running its current bundle until it is restarted.
|
|
81
|
+
*/
|
|
82
|
+
export let TAB_CAPTIONS = /*#__PURE__*/function (TAB_CAPTIONS) {
|
|
83
|
+
TAB_CAPTIONS["STAGE"] = "Switch off to run Production Mode - what your customers run. Applies on restart.";
|
|
84
|
+
TAB_CAPTIONS["PROD"] = "Switch on to run Testing Mode - bundles shared with your team. Applies on restart.";
|
|
85
|
+
return TAB_CAPTIONS;
|
|
86
|
+
}({});
|
|
87
|
+
export let SECTION_LABELS = /*#__PURE__*/function (SECTION_LABELS) {
|
|
88
|
+
SECTION_LABELS["BUCKETS"] = "BUCKETS";
|
|
89
|
+
SECTION_LABELS["THIS_DEVICE"] = "THIS DEVICE";
|
|
90
|
+
SECTION_LABELS["NEW_BUNDLE"] = "NEW BUNDLE";
|
|
91
|
+
SECTION_LABELS["ACTIVE_BUNDLE"] = "ACTIVE BUNDLE";
|
|
92
|
+
return SECTION_LABELS;
|
|
93
|
+
}({});
|
|
94
|
+
export let CHIP_TEXTS = /*#__PURE__*/function (CHIP_TEXTS) {
|
|
95
|
+
CHIP_TEXTS["LATEST"] = "Latest";
|
|
96
|
+
CHIP_TEXTS["DOWNLOADED"] = "Downloaded";
|
|
97
|
+
CHIP_TEXTS["APPLIED"] = "Applied";
|
|
98
|
+
return CHIP_TEXTS;
|
|
99
|
+
}({});
|
|
100
|
+
export const RESTART_BUTTON_TEXT = 'Restart';
|
|
101
|
+
export const READ_MORE_TEXT = 'Read more';
|
|
102
|
+
export const READ_LESS_TEXT = 'Read less';
|
|
103
|
+
export let BUNDLE_META_STATES = /*#__PURE__*/function (BUNDLE_META_STATES) {
|
|
104
|
+
BUNDLE_META_STATES["NOT_APPLIED"] = "Not applied";
|
|
105
|
+
BUNDLE_META_STATES["APPLIES_ON_RESTART"] = "Applies on restart";
|
|
106
|
+
BUNDLE_META_STATES["APPLIED"] = "Applied";
|
|
107
|
+
return BUNDLE_META_STATES;
|
|
108
|
+
}({});
|
|
109
|
+
export const META_SEPARATOR = ' · ';
|
|
110
|
+
/** Bundle cards title versions lowercase ("v3"); bucket meta uses "V3". */
|
|
111
|
+
export const BUNDLE_VERSION_PREFIX = 'v';
|
|
112
|
+
export const BUCKET_UPDATED_PREFIX = 'Updated ';
|
|
113
|
+
export const BUNDLE_COUNT_SUFFIX = ' bundles';
|
|
114
|
+
export const BUNDLE_COUNT_SUFFIX_SINGULAR = ' bundle';
|
|
115
|
+
export const DEVICE_ROW_APP_VERSION = 'App Version';
|
|
116
|
+
export const DEVICE_ROW_UID = 'UID';
|
|
117
|
+
export const PROD_EMPTY_TITLE = 'No bundles in Production';
|
|
118
|
+
export const PROD_EMPTY_SUBTITLE = 'Promote a bundle from Testing and it will appear here.';
|
|
119
|
+
export const EMPTY_BUCKETS_TITLE = 'No buckets yet';
|
|
120
|
+
export const EMPTY_BUCKETS_SUBTITLE = 'Create a bucket from the Stallion dashboard and it will appear here.';
|
|
121
|
+
export const EMPTY_BUNDLES_TITLE = 'No bundles in this bucket';
|
|
122
|
+
export const EMPTY_BUNDLES_SUBTITLE = 'Upload a bundle from the Stallion CLI and it will appear here.';
|
|
123
|
+
export const GENERIC_ERROR_TITLE = 'Something went wrong';
|
|
121
124
|
//# sourceMappingURL=appConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","HEADER_TITLE","Login_TITLE","
|
|
1
|
+
{"version":3,"names":["Platform","HEADER_TITLE","Login_TITLE","HEADER_SLAB_HEIGHT","STD_MARGIN","END_REACH_THRESHOLD","DOWNLOAD_BUTTON_TEXT","SWITCH_TEXTS","DEFAULT_ERROR_MESSAGE","EMPTY_ERROR_MESSAGE","EMPTY_ERROR_MESSAGE_BUNDLE","DEFAULT_ERROR_PREFIX","VERSION_PREFIX","RETRY_BUTTON_TEXT","CURRENT_PLATFORM","OS","IS_ANDROID","KEYBOARD_AVOIDING_BEHAVIOUR","EMPTY_STATE","data","isLoading","error","PIN_LENGTH","SUBMIT_BUTTON_TEXT","PIN_INPUT_KEY","NOT_APPLICABLE_TEXT","STALLION_LOGO_URL","STALLION_EB_INFO","STALLION_EB_BTN_TXT","NATIVE_CONSTANTS","NativeEventTypesProd","NativeEventTypesStage","STALLION_NATIVE_EVENT","DEFAULT_STALLION_PARAMS","WORDMARK_TEXT","TAB_CAPTIONS","SECTION_LABELS","CHIP_TEXTS","RESTART_BUTTON_TEXT","READ_MORE_TEXT","READ_LESS_TEXT","BUNDLE_META_STATES","META_SEPARATOR","BUNDLE_VERSION_PREFIX","BUCKET_UPDATED_PREFIX","BUNDLE_COUNT_SUFFIX","BUNDLE_COUNT_SUFFIX_SINGULAR","DEVICE_ROW_APP_VERSION","DEVICE_ROW_UID","PROD_EMPTY_TITLE","PROD_EMPTY_SUBTITLE","EMPTY_BUCKETS_TITLE","EMPTY_BUCKETS_SUBTITLE","EMPTY_BUNDLES_TITLE","EMPTY_BUNDLES_SUBTITLE","GENERIC_ERROR_TITLE"],"sourceRoot":"../../../../src","sources":["main/constants/appConstants.ts"],"mappings":"AAAA,SAASA,QAAQ,QAA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lBA,kBAAkB;AAAA;AAM9B,OAAO,MAAMC,cAAc,GAAG,KAAK;AACnC;AACA,OAAO,MAAMC,qBAAqB,GAAG,GAAG;AACxC,OAAO,MAAMC,qBAAqB,GAAG,UAAU;AAC/C,OAAO,MAAMC,mBAAmB,GAAG,UAAU;AAC7C,OAAO,MAAMC,4BAA4B,GAAG,SAAS;AAErD,OAAO,MAAMC,sBAAsB,GAAG,aAAa;AACnD,OAAO,MAAMC,cAAc,GAAG,KAAK;AAEnC,OAAO,MAAMC,gBAAgB,GAAG,0BAA0B;AAC1D,OAAO,MAAMC,mBAAmB,GAC9B,wDAAwD;AAE1D,OAAO,MAAMC,mBAAmB,GAAG,gBAAgB;AACnD,OAAO,MAAMC,sBAAsB,GACjC,sEAAsE;AACxE,OAAO,MAAMC,mBAAmB,GAAG,2BAA2B;AAC9D,OAAO,MAAMC,sBAAsB,GACjC,gEAAgE;AAClE,OAAO,MAAMC,mBAAmB,GAAG,sBAAsB"}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
export const COLORS = {
|
|
2
|
-
indigo: '#514AC3',
|
|
3
2
|
white: '#ffffff',
|
|
4
3
|
black: '#000000',
|
|
5
|
-
background_grey: '#f2f2f4',
|
|
6
|
-
error: '#FA6969',
|
|
7
|
-
green: '#1E9B21',
|
|
8
4
|
red: '#FA6969',
|
|
9
5
|
black7: 'rgba(0,0,0,0.7)',
|
|
10
6
|
black2: 'rgba(0,0,0,0.2)',
|
|
11
7
|
black5: 'rgba(0,0,0,0.5)',
|
|
12
|
-
|
|
13
|
-
white7: 'rgba(255,255,255,0.7)',
|
|
14
|
-
orange: '#ff6303',
|
|
15
|
-
blue: 'blue',
|
|
16
|
-
text_major: '#5F5F5F',
|
|
17
|
-
text_light: '#5F5F5F80'
|
|
8
|
+
text_major: '#5F5F5F'
|
|
18
9
|
};
|
|
19
10
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COLORS","
|
|
1
|
+
{"version":3,"names":["COLORS","white","black","red","black7","black2","black5","text_major"],"sourceRoot":"../../../../src","sources":["main/constants/colors.ts"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,GAAG,EAAE,SAAS;EACdC,MAAM,EAAE,iBAAiB;EACzBC,MAAM,EAAE,iBAAiB;EACzBC,MAAM,EAAE,iBAAiB;EACzBC,UAAU,EAAE;AACd,CAAC"}
|