@pi-spi/app 1.5.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -30
- package/example/App.tsx +27 -24
- package/lib/module/core/assets.js +0 -7
- package/lib/module/core/assets.js.map +1 -1
- package/lib/module/core/di.js +17 -8
- package/lib/module/core/di.js.map +1 -1
- package/lib/module/core/pi_spi_custom_theme.js +22 -10
- package/lib/module/core/pi_spi_custom_theme.js.map +1 -1
- package/lib/module/core/pi_spi_sdk_config.js +22 -8
- package/lib/module/core/pi_spi_sdk_config.js.map +1 -1
- package/lib/module/core/theme.js +345 -225
- package/lib/module/core/theme.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/l10n/app_localizations.js.map +1 -1
- package/lib/module/l10n/app_localizations_en.js +26 -1
- package/lib/module/l10n/app_localizations_en.js.map +1 -1
- package/lib/module/l10n/app_localizations_fr.js +26 -1
- package/lib/module/l10n/app_localizations_fr.js.map +1 -1
- package/lib/module/l10n/app_localizations_pt.js +26 -1
- package/lib/module/l10n/app_localizations_pt.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js +15 -19
- package/lib/module/modules/alias/presentation/pages/alias_delete_btn_widget.js.map +1 -1
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js +4 -11
- package/lib/module/modules/alias/presentation/pages/alias_page_claim.js.map +1 -1
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js +6 -7
- package/lib/module/modules/compte/presentation/pages/compte_details_widget.js.map +1 -1
- package/lib/module/modules/config/domain/models/config_keys.js +3 -1
- package/lib/module/modules/config/domain/models/config_keys.js.map +1 -1
- package/lib/module/modules/config/domain/services/config_service.js +31 -2
- package/lib/module/modules/config/domain/services/config_service.js.map +1 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte.js +0 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte.js.map +1 -1
- package/lib/module/modules/home/presentation/pages/home_tab_compte_more_menu.js +38 -37
- package/lib/module/modules/home/presentation/pages/home_tab_compte_more_menu.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js +25 -11
- package/lib/module/modules/profile/presentation/pages/compte/profile_compte_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js +14 -20
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js +109 -103
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js +55 -72
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js +31 -45
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js +175 -203
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js +26 -0
- package/lib/module/modules/profile/presentation/pages/profile_app_bar.js.map +1 -0
- package/lib/module/modules/profile/presentation/pages/profile_menu.js +144 -34
- package/lib/module/modules/profile/presentation/pages/profile_menu.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page.js +95 -63
- package/lib/module/modules/profile/presentation/pages/profile_page.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js +97 -45
- package/lib/module/modules/profile/presentation/pages/profile_page_avatar.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js +9 -8
- package/lib/module/modules/profile/presentation/pages/profile_page_contacts.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js +26 -2
- package/lib/module/modules/search/presentation/pages/search_fonctionnalites.js.map +1 -1
- package/lib/module/modules/search/presentation/pages/search_page.js +0 -1
- package/lib/module/modules/search/presentation/pages/search_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.js +3 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js +4 -11
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js +13 -10
- package/lib/module/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.js +5 -4
- package/lib/module/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.js.map +1 -1
- package/lib/module/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.js +2 -2
- package/lib/module/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.js.map +1 -1
- package/lib/module/pi_spi_sdk_entry.js +7 -2
- package/lib/module/pi_spi_sdk_entry.js.map +1 -1
- package/lib/module/shared/utils/color.js +15 -0
- package/lib/module/shared/utils/color.js.map +1 -0
- package/lib/module/shared/widgets/custom_progressbar.js +3 -2
- package/lib/module/shared/widgets/custom_progressbar.js.map +1 -1
- package/lib/module/shared/widgets/error_card_widget.js +70 -0
- package/lib/module/shared/widgets/error_card_widget.js.map +1 -0
- package/lib/module/shared/widgets/selection.js +136 -0
- package/lib/module/shared/widgets/selection.js.map +1 -0
- package/lib/typescript/src/core/assets.d.ts +0 -7
- package/lib/typescript/src/core/assets.d.ts.map +1 -1
- package/lib/typescript/src/core/di.d.ts.map +1 -1
- package/lib/typescript/src/core/pi_spi_custom_theme.d.ts +17 -8
- package/lib/typescript/src/core/pi_spi_custom_theme.d.ts.map +1 -1
- package/lib/typescript/src/core/pi_spi_sdk_config.d.ts +22 -8
- package/lib/typescript/src/core/pi_spi_sdk_config.d.ts.map +1 -1
- package/lib/typescript/src/core/theme.d.ts +123 -53
- package/lib/typescript/src/core/theme.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations.d.ts +50 -0
- package/lib/typescript/src/l10n/app_localizations.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_en.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_fr.d.ts.map +1 -1
- package/lib/typescript/src/l10n/app_localizations_pt.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_delete_btn_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/alias/presentation/pages/alias_page_claim.d.ts.map +1 -1
- package/lib/typescript/src/modules/compte/presentation/pages/compte_details_widget.d.ts.map +1 -1
- package/lib/typescript/src/modules/config/domain/models/config_keys.d.ts +3 -1
- package/lib/typescript/src/modules/config/domain/models/config_keys.d.ts.map +1 -1
- package/lib/typescript/src/modules/config/domain/services/config_service.d.ts +7 -0
- package/lib/typescript/src/modules/config/domain/services/config_service.d.ts.map +1 -1
- package/lib/typescript/src/modules/home/presentation/pages/home_tab_compte_more_menu.d.ts +2 -0
- package/lib/typescript/src/modules/home/presentation/pages/home_tab_compte_more_menu.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/compte/profile_compte_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.d.ts +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts +5 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_app_bar.d.ts.map +1 -0
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts +31 -4
- package/lib/typescript/src/modules/profile/presentation/pages/profile_menu.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts +4 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_avatar.d.ts.map +1 -1
- package/lib/typescript/src/modules/profile/presentation/pages/profile_page_contacts.d.ts.map +1 -1
- package/lib/typescript/src/modules/search/presentation/pages/search_fonctionnalites.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.d.ts.map +1 -1
- package/lib/typescript/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.d.ts.map +1 -1
- package/lib/typescript/src/shared/utils/color.d.ts +7 -0
- package/lib/typescript/src/shared/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/custom_progressbar.d.ts.map +1 -1
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts +11 -0
- package/lib/typescript/src/shared/widgets/error_card_widget.d.ts.map +1 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts +21 -0
- package/lib/typescript/src/shared/widgets/selection.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/assets.ts +0 -7
- package/src/core/di.ts +13 -8
- package/src/core/pi_spi_custom_theme.ts +22 -15
- package/src/core/pi_spi_sdk_config.ts +27 -9
- package/src/core/theme.ts +381 -269
- package/src/index.ts +1 -1
- package/src/l10n/app_localizations.ts +50 -0
- package/src/l10n/app_localizations_en.ts +25 -0
- package/src/l10n/app_localizations_fr.ts +25 -0
- package/src/l10n/app_localizations_pt.ts +25 -0
- package/src/modules/alias/presentation/pages/alias_delete_btn_widget.tsx +13 -12
- package/src/modules/alias/presentation/pages/alias_page_claim.tsx +5 -4
- package/src/modules/compte/presentation/pages/compte_details_widget.tsx +3 -4
- package/src/modules/config/domain/models/config_keys.ts +3 -1
- package/src/modules/config/domain/services/config_service.ts +31 -2
- package/src/modules/home/presentation/pages/home_tab_compte.tsx +1 -1
- package/src/modules/home/presentation/pages/home_tab_compte_more_menu.tsx +34 -42
- package/src/modules/profile/presentation/pages/compte/profile_compte_page.tsx +15 -7
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page.tsx +12 -17
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications.tsx +89 -68
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_notifications_son.tsx +84 -54
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.tsx +28 -24
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.tsx +121 -131
- package/src/modules/profile/presentation/pages/profile_app_bar.tsx +21 -0
- package/src/modules/profile/presentation/pages/profile_menu.tsx +126 -33
- package/src/modules/profile/presentation/pages/profile_page.tsx +90 -66
- package/src/modules/profile/presentation/pages/profile_page_avatar.tsx +69 -28
- package/src/modules/profile/presentation/pages/profile_page_contacts.tsx +5 -4
- package/src/modules/search/presentation/pages/search_fonctionnalites.ts +40 -7
- package/src/modules/search/presentation/pages/search_page.tsx +1 -1
- package/src/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.tsx +3 -1
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page.tsx +2 -4
- package/src/modules/transactions/presentation/pages/transaction_rtp/transaction_rtp_page_actions.tsx +13 -6
- package/src/modules/transactions/presentation/pages/transaction_search/transaction_search_page_filters.tsx +4 -4
- package/src/modules/transactions/presentation/pages/transaction_split/transaction_split_page_repartition.tsx +2 -2
- package/src/pi_spi_sdk_entry.tsx +9 -2
- package/src/shared/utils/color.ts +14 -0
- package/src/shared/widgets/custom_progressbar.tsx +3 -2
- package/src/shared/widgets/error_card_widget.tsx +58 -0
- package/src/shared/widgets/selection.tsx +98 -0
- package/assets/images/theme_light_blue.jpeg +0 -0
- package/assets/images/theme_light_green.jpeg +0 -0
- package/assets/images/theme_light_orange.jpeg +0 -0
- package/assets/images/theme_light_pink.jpeg +0 -0
- package/assets/images/theme_light_purple.jpeg +0 -0
- package/assets/images/theme_light_red.jpeg +0 -0
- package/assets/images/theme_light_yellow.jpeg +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text } from 'react-native';
|
|
4
|
+
import { AppRouter, useAppRouter } from "../../../../core/router.js";
|
|
5
|
+
import { useTheme } from "../../../../core/theme.js";
|
|
6
|
+
import { AppBar } from "../../../../shared/material/scaffold.js";
|
|
7
|
+
|
|
8
|
+
/** Barre des écrans du profil : bouton retour et [titre] de la page. */
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export function ProfileAppBar({
|
|
11
|
+
titre
|
|
12
|
+
}) {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
const router = useAppRouter();
|
|
15
|
+
return /*#__PURE__*/_jsx(AppBar, {
|
|
16
|
+
onBack: () => AppRouter.pop(router),
|
|
17
|
+
title: /*#__PURE__*/_jsx(Text, {
|
|
18
|
+
numberOfLines: 1,
|
|
19
|
+
style: [theme.textTheme.headlineMedium, {
|
|
20
|
+
color: theme.appBarTheme.foregroundColor
|
|
21
|
+
}],
|
|
22
|
+
children: titre
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=profile_app_bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","AppRouter","useAppRouter","useTheme","AppBar","jsx","_jsx","ProfileAppBar","titre","theme","router","onBack","pop","title","numberOfLines","style","textTheme","headlineMedium","color","appBarTheme","foregroundColor","children"],"sourceRoot":"../../../../../../src","sources":["modules/profile/presentation/pages/profile_app_bar.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,SAAS,EAAEC,YAAY,QAAQ,4BAAyB;AACjE,SAASC,QAAQ,QAAQ,2BAAwB;AACjD,SAASC,MAAM,QAAQ,yCAAsC;;AAE7D;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,SAASC,aAAaA,CAAC;EAAEC;AAAyB,CAAC,EAAE;EAC1D,MAAMC,KAAK,GAAGN,QAAQ,CAAC,CAAC;EACxB,MAAMO,MAAM,GAAGR,YAAY,CAAC,CAAC;EAC7B,oBACEI,IAAA,CAACF,MAAM;IACLO,MAAM,EAAEA,CAAA,KAAMV,SAAS,CAACW,GAAG,CAACF,MAAM,CAAE;IACpCG,KAAK,eACHP,IAAA,CAACN,IAAI;MAACc,aAAa,EAAE,CAAE;MAACC,KAAK,EAAE,CAACN,KAAK,CAACO,SAAS,CAACC,cAAc,EAAE;QAAEC,KAAK,EAAET,KAAK,CAACU,WAAW,CAACC;MAAgB,CAAC,CAAE;MAAAC,QAAA,EAC3Gb;IAAK,CACF;EACP,CACF,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { MaterialIcons } from '@expo/vector-icons';
|
|
3
4
|
import { Image } from 'expo-image';
|
|
4
|
-
import {
|
|
5
|
+
import { Fragment, isValidElement } from 'react';
|
|
6
|
+
import { Platform, Pressable, StyleSheet, Switch, Text, View } from 'react-native';
|
|
5
7
|
import { AppRouter, useAppRouter } from "../../../../core/router.js";
|
|
6
|
-
import { useTheme } from "../../../../core/theme.js";
|
|
8
|
+
import { Themer, useTheme } from "../../../../core/theme.js";
|
|
7
9
|
import { Card } from "../../../../shared/material/card.js";
|
|
8
10
|
import { showModalBottomSheet } from "../../../../shared/material/overlays.js";
|
|
11
|
+
import { withAlpha } from "../../../../shared/utils/color.js";
|
|
9
12
|
|
|
10
13
|
/** Une entrée du menu du profil : une route, une action, ou une feuille à ouvrir. */
|
|
11
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -21,42 +24,33 @@ export class ProfileItem {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Groupe d'entrées du profil dans une carte : [titre] de section facultatif
|
|
29
|
+
* au-dessus, puis une ligne par élément, séparées par un trait. Les [items]
|
|
30
|
+
* sont des `ProfileItem` ou des composants déjà construits (ex. bouton de
|
|
31
|
+
* modification du code PIN, qui utilise `ProfileMenuTile`).
|
|
32
|
+
*/
|
|
25
33
|
export function ProfilePageMenu({
|
|
26
|
-
items
|
|
34
|
+
items,
|
|
35
|
+
titre
|
|
27
36
|
}) {
|
|
28
37
|
const theme = useTheme();
|
|
29
38
|
const router = useAppRouter();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
const lignes = items.map(item => {
|
|
40
|
+
if (!(item instanceof ProfileItem)) return /*#__PURE__*/isValidElement(item) ? item : null;
|
|
41
|
+
const aSwitch = item.action != null && item.value != null;
|
|
42
|
+
return /*#__PURE__*/_jsx(ProfileMenuTile, {
|
|
43
|
+
image: item.icon,
|
|
44
|
+
titre: item.title,
|
|
45
|
+
sousTitre: item.subtitle,
|
|
33
46
|
onPress: () => {
|
|
34
47
|
if (typeof item.page === 'string') void AppRouter.push(router, item.page);else if (typeof item.page === 'function') item.page();
|
|
35
48
|
// Ouvrir une feuille
|
|
36
49
|
else if (item.sheet != null) void showModalBottomSheet(router, {
|
|
37
|
-
themed: true,
|
|
38
50
|
builder: item.sheet
|
|
39
51
|
});
|
|
40
52
|
},
|
|
41
|
-
|
|
42
|
-
pressed
|
|
43
|
-
}) => [styles.tile, pressed ? {
|
|
44
|
-
backgroundColor: theme.colorScheme.secondary
|
|
45
|
-
} : null],
|
|
46
|
-
children: [/*#__PURE__*/_jsx(Image, {
|
|
47
|
-
source: item.icon,
|
|
48
|
-
style: styles.icon,
|
|
49
|
-
tintColor: theme.colorScheme.onSurface
|
|
50
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
51
|
-
style: styles.texts,
|
|
52
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
53
|
-
style: theme.textTheme.bodyLarge,
|
|
54
|
-
children: item.title
|
|
55
|
-
}), item.subtitle != null && /*#__PURE__*/_jsx(Text, {
|
|
56
|
-
style: theme.textTheme.displaySmall,
|
|
57
|
-
children: item.subtitle
|
|
58
|
-
})]
|
|
59
|
-
}), item.action != null && item.value != null && /*#__PURE__*/_jsx(Switch, {
|
|
53
|
+
trailing: aSwitch ? /*#__PURE__*/_jsx(Switch, {
|
|
60
54
|
value: item.value,
|
|
61
55
|
onValueChange: item.action,
|
|
62
56
|
trackColor: {
|
|
@@ -64,25 +58,141 @@ export function ProfilePageMenu({
|
|
|
64
58
|
true: theme.switchTheme.activeTrackColor
|
|
65
59
|
},
|
|
66
60
|
thumbColor: theme.switchTheme.thumbColor
|
|
61
|
+
}) : undefined
|
|
62
|
+
});
|
|
63
|
+
}).filter(ligne => ligne != null);
|
|
64
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
65
|
+
children: [titre != null && /*#__PURE__*/_jsx(ProfileSectionTitre, {
|
|
66
|
+
titre: titre
|
|
67
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
68
|
+
style: styles.card,
|
|
69
|
+
children: lignes.map((ligne, i) => /*#__PURE__*/_jsxs(Fragment, {
|
|
70
|
+
children: [i > 0 && /*#__PURE__*/_jsx(View, {
|
|
71
|
+
style: [styles.separateur, {
|
|
72
|
+
backgroundColor: withAlpha(Themer.neural03Color, 0.25)
|
|
73
|
+
}]
|
|
74
|
+
}), ligne]
|
|
75
|
+
}, i))
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Ligne d'un menu du profil : pastille avec l'icône, [titre], [sousTitre]
|
|
82
|
+
* facultatif et, à droite, [trailing] (ex. Switch) ou une flèche.
|
|
83
|
+
* [couleur] remplace la couleur principale (ex. rouge pour une action
|
|
84
|
+
* destructive).
|
|
85
|
+
*/
|
|
86
|
+
export function ProfileMenuTile({
|
|
87
|
+
image,
|
|
88
|
+
icone,
|
|
89
|
+
titre,
|
|
90
|
+
sousTitre,
|
|
91
|
+
onPress,
|
|
92
|
+
trailing,
|
|
93
|
+
couleur,
|
|
94
|
+
disabled
|
|
95
|
+
}) {
|
|
96
|
+
const theme = useTheme();
|
|
97
|
+
const principale = couleur ?? theme.colorScheme.primary;
|
|
98
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
99
|
+
accessibilityRole: "button",
|
|
100
|
+
disabled: disabled,
|
|
101
|
+
onPress: onPress,
|
|
102
|
+
style: ({
|
|
103
|
+
pressed
|
|
104
|
+
}) => [styles.tile, pressed ? {
|
|
105
|
+
backgroundColor: theme.colorScheme.secondary
|
|
106
|
+
} : null],
|
|
107
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
108
|
+
style: [styles.pastille, {
|
|
109
|
+
backgroundColor: withAlpha(principale, 0.14)
|
|
110
|
+
}],
|
|
111
|
+
children: image != null ? /*#__PURE__*/_jsx(Image, {
|
|
112
|
+
source: image,
|
|
113
|
+
style: styles.icon,
|
|
114
|
+
tintColor: couleur ?? theme.colorScheme.onSurface
|
|
115
|
+
}) : /*#__PURE__*/_jsx(MaterialIcons, {
|
|
116
|
+
name: icone ?? 'circle',
|
|
117
|
+
size: 20,
|
|
118
|
+
color: principale
|
|
119
|
+
})
|
|
120
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
121
|
+
style: styles.texts,
|
|
122
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
123
|
+
style: [theme.textTheme.displayLarge, styles.titre, couleur != null ? {
|
|
124
|
+
color: couleur
|
|
125
|
+
} : null],
|
|
126
|
+
children: titre
|
|
127
|
+
}), sousTitre != null && sousTitre.length > 0 && /*#__PURE__*/_jsx(Text, {
|
|
128
|
+
style: [theme.textTheme.displaySmall, styles.sousTitre, {
|
|
129
|
+
color: Themer.neural03Color
|
|
130
|
+
}],
|
|
131
|
+
children: sousTitre
|
|
67
132
|
})]
|
|
68
|
-
},
|
|
133
|
+
}), trailing ?? /*#__PURE__*/_jsx(MaterialIcons, {
|
|
134
|
+
name: Platform.OS === 'ios' ? 'arrow-forward-ios' : 'arrow-forward',
|
|
135
|
+
size: 18,
|
|
136
|
+
color: couleur ?? Themer.neural03Color
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** Titre d'une section du profil, en petites capitales. */
|
|
142
|
+
export function ProfileSectionTitre({
|
|
143
|
+
titre
|
|
144
|
+
}) {
|
|
145
|
+
const theme = useTheme();
|
|
146
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
147
|
+
style: [theme.textTheme.displaySmall, styles.section, {
|
|
148
|
+
color: Themer.neural03Color
|
|
149
|
+
}],
|
|
150
|
+
children: titre.toUpperCase()
|
|
69
151
|
});
|
|
70
152
|
}
|
|
71
153
|
const styles = StyleSheet.create({
|
|
154
|
+
card: {
|
|
155
|
+
margin: 0
|
|
156
|
+
},
|
|
72
157
|
tile: {
|
|
73
158
|
flexDirection: 'row',
|
|
74
159
|
alignItems: 'center',
|
|
75
|
-
paddingHorizontal:
|
|
76
|
-
|
|
77
|
-
|
|
160
|
+
paddingHorizontal: 14,
|
|
161
|
+
paddingVertical: 12
|
|
162
|
+
},
|
|
163
|
+
pastille: {
|
|
164
|
+
width: 40,
|
|
165
|
+
height: 40,
|
|
166
|
+
borderRadius: 12,
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
justifyContent: 'center'
|
|
78
169
|
},
|
|
79
170
|
icon: {
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
171
|
+
width: 20,
|
|
172
|
+
height: 20
|
|
82
173
|
},
|
|
83
174
|
texts: {
|
|
84
175
|
flex: 1,
|
|
85
|
-
marginLeft:
|
|
176
|
+
marginLeft: 14,
|
|
177
|
+
marginRight: 8
|
|
178
|
+
},
|
|
179
|
+
titre: {
|
|
180
|
+
fontWeight: '500'
|
|
181
|
+
},
|
|
182
|
+
sousTitre: {
|
|
183
|
+
marginTop: 2
|
|
184
|
+
},
|
|
185
|
+
section: {
|
|
186
|
+
fontSize: 12,
|
|
187
|
+
letterSpacing: 0.8,
|
|
188
|
+
fontWeight: '600',
|
|
189
|
+
marginLeft: 4,
|
|
190
|
+
marginBottom: 8
|
|
191
|
+
},
|
|
192
|
+
// Trait aligné sur le texte (après la pastille)
|
|
193
|
+
separateur: {
|
|
194
|
+
height: StyleSheet.hairlineWidth,
|
|
195
|
+
marginLeft: 68
|
|
86
196
|
}
|
|
87
197
|
});
|
|
88
198
|
//# sourceMappingURL=profile_menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Image","Pressable","StyleSheet","Switch","Text","View","AppRouter","useAppRouter","useTheme","Card","showModalBottomSheet","jsx","_jsx","jsxs","_jsxs","ProfileItem","constructor","icon","title","page","options","subtitle","value","action","sheet","ProfilePageMenu","items","theme","router","
|
|
1
|
+
{"version":3,"names":["MaterialIcons","Image","Fragment","isValidElement","Platform","Pressable","StyleSheet","Switch","Text","View","AppRouter","useAppRouter","Themer","useTheme","Card","showModalBottomSheet","withAlpha","jsx","_jsx","jsxs","_jsxs","ProfileItem","constructor","icon","title","page","options","subtitle","value","action","sheet","ProfilePageMenu","items","titre","theme","router","lignes","map","item","aSwitch","ProfileMenuTile","image","sousTitre","onPress","push","builder","trailing","onValueChange","trackColor","false","switchTheme","inactiveTrackColor","true","activeTrackColor","thumbColor","undefined","filter","ligne","children","ProfileSectionTitre","style","styles","card","i","separateur","backgroundColor","neural03Color","icone","couleur","disabled","principale","colorScheme","primary","accessibilityRole","pressed","tile","secondary","pastille","source","tintColor","onSurface","name","size","color","texts","textTheme","displayLarge","length","displaySmall","OS","section","toUpperCase","create","margin","flexDirection","alignItems","paddingHorizontal","paddingVertical","width","height","borderRadius","justifyContent","flex","marginLeft","marginRight","fontWeight","marginTop","fontSize","letterSpacing","marginBottom","hairlineWidth"],"sourceRoot":"../../../../../../src","sources":["modules/profile/presentation/pages/profile_menu.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,QAAQ,EAAEC,cAAc,QAAgE,OAAO;AACxG,SAASC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAElF,SAASC,SAAS,EAAEC,YAAY,QAAQ,4BAAyB;AACjE,SAASC,MAAM,EAAEC,QAAQ,QAAQ,2BAAwB;AACzD,SAASC,IAAI,QAAQ,qCAAkC;AACvD,SAASC,oBAAoB,QAAQ,yCAAsC;AAC3E,SAASC,SAAS,QAAQ,mCAAgC;;AAE1D;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,OAAO,MAAMC,WAAW,CAAC;EAMvBC,WAAWA,CACAC,IAAY,EACZC,KAAa,EACbC,IAAkC,EAC3CC,OAA2G,GAAG,CAAC,CAAC,EAChH;IAAA,KAJSH,IAAY,GAAZA,IAAY;IAAA,KACZC,KAAa,GAAbA,KAAa;IAAA,KACbC,IAAkC,GAAlCA,IAAkC;IAG3C,IAAI,CAACE,QAAQ,GAAGD,OAAO,CAACC,QAAQ;IAChC,IAAI,CAACC,KAAK,GAAGF,OAAO,CAACE,KAAK;IAC1B,IAAI,CAACC,MAAM,GAAGH,OAAO,CAACG,MAAM;IAC5B,IAAI,CAACC,KAAK,GAAGJ,OAAO,CAACI,KAAK;EAC5B;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;A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;EAAE,CAAC;EAClDvE,KAAK,EAAE;IAAEwE,UAAU,EAAE;EAAM,CAAC;EAC5B/D,SAAS,EAAE;IAAEgE,SAAS,EAAE;EAAE,CAAC;EAC3BhB,OAAO,EAAE;IAAEiB,QAAQ,EAAE,EAAE;IAAEC,aAAa,EAAE,GAAG;IAAEH,UAAU,EAAE,KAAK;IAAEF,UAAU,EAAE,CAAC;IAAEM,YAAY,EAAE;EAAE,CAAC;EAChG;EACA7C,UAAU,EAAE;IAAEmC,MAAM,EAAE7F,UAAU,CAACwG,aAAa;IAAEP,UAAU,EAAE;EAAG;AACjE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Linking, Platform, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { Linking, Platform, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
4
4
|
import { Images } from "../../../../core/assets.js";
|
|
5
5
|
import { AppEnv } from "../../../../core/env.js";
|
|
6
6
|
import { Logger } from "../../../../core/logger.js";
|
|
7
7
|
import { AppRouter, useAppRouter } from "../../../../core/router.js";
|
|
8
8
|
import { Themer, useTheme } from "../../../../core/theme.js";
|
|
9
9
|
import { useAppLocalizations } from "../../../../l10n/localizations.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Scaffold } from "../../../../shared/material/scaffold.js";
|
|
11
|
+
import { withAlpha } from "../../../../shared/utils/color.js";
|
|
12
12
|
import { MyPageContainer } from "../../../../shared/widgets/my_page_container.js";
|
|
13
|
+
import { ProfileAppBar } from "./profile_app_bar.js";
|
|
13
14
|
import { ProfilePageMenu, ProfileItem } from "./profile_menu.js";
|
|
14
15
|
import { ProfilePageAvatar } from "./profile_page_avatar.js";
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const logger = new Logger();
|
|
17
18
|
async function launchUrl(url) {
|
|
18
19
|
try {
|
|
@@ -21,7 +22,7 @@ async function launchUrl(url) {
|
|
|
21
22
|
logger.d(`Impossible de lancer ${url}`);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function menuCompteItems(traductions) {
|
|
25
26
|
const items = [
|
|
26
27
|
// Compte
|
|
27
28
|
new ProfileItem(Images.iconsCircleUser, traductions.profilePageMenuCompteTitle, AppRouter.profileCompte),
|
|
@@ -31,90 +32,121 @@ function menuItems(traductions) {
|
|
|
31
32
|
if (Platform.OS !== 'web') {
|
|
32
33
|
items.push(new ProfileItem(Images.iconTransactionSendByAlias, traductions.profilePageMenuAliasContactTitle, AppRouter.profileContacts));
|
|
33
34
|
}
|
|
34
|
-
// Centre d'aide
|
|
35
|
-
if (AppEnv.aideLink != null && AppEnv.aideLink.length > 0) {
|
|
36
|
-
const aideLink = AppEnv.aideLink;
|
|
37
|
-
items.push(new ProfileItem(Images.iconsHelp, traductions.profilePageMenuHelpTitle, Platform.OS !== 'web' ? AppRouter.profileHelpCenter : () => void launchUrl(aideLink)));
|
|
38
|
-
}
|
|
39
35
|
return items;
|
|
40
36
|
}
|
|
37
|
+
function menuAssistanceItems(traductions) {
|
|
38
|
+
// Centre d'aide (seulement si l'hôte fournit un lien)
|
|
39
|
+
const aideLink = AppEnv.aideLink;
|
|
40
|
+
if (aideLink == null || aideLink.length === 0) return [];
|
|
41
|
+
return [new ProfileItem(Images.iconsHelp, traductions.profilePageMenuHelpTitle, Platform.OS !== 'web' ? AppRouter.profileHelpCenter : () => void launchUrl(aideLink))];
|
|
42
|
+
}
|
|
41
43
|
|
|
42
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Profil du client (route `profile`) : en-tête de l'utilisateur, menus
|
|
46
|
+
* « Mon compte » et « Assistance », puis liens légaux et version de l'app.
|
|
47
|
+
*/
|
|
43
48
|
export function ProfilePage() {
|
|
44
49
|
const traductions = useAppLocalizations();
|
|
45
50
|
const theme = useTheme();
|
|
46
51
|
const router = useAppRouter();
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const assistance = menuAssistanceItems(traductions);
|
|
53
|
+
// CGU et politique de confidentialité optionnelles : l'hôte peut ne pas en fournir
|
|
54
|
+
const cguLink = AppEnv.cguLink;
|
|
55
|
+
const pocLink = AppEnv.pocLink;
|
|
56
|
+
const hasCgu = cguLink != null && cguLink.length > 0;
|
|
57
|
+
const hasPoc = pocLink != null && pocLink.length > 0;
|
|
58
|
+
const lienStyle = [theme.textTheme.displaySmall, {
|
|
59
|
+
color: Themer.neural03Color,
|
|
60
|
+
textDecorationLine: 'underline',
|
|
61
|
+
textAlign: 'center'
|
|
62
|
+
}];
|
|
63
|
+
const lien = (texte, onPress) => /*#__PURE__*/_jsx(Pressable, {
|
|
64
|
+
accessibilityRole: "link",
|
|
65
|
+
onPress: onPress,
|
|
66
|
+
style: styles.lien,
|
|
67
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
68
|
+
style: lienStyle,
|
|
69
|
+
children: texte
|
|
70
|
+
})
|
|
71
|
+
});
|
|
53
72
|
return /*#__PURE__*/_jsx(Scaffold, {
|
|
54
|
-
appBar: /*#__PURE__*/_jsx(
|
|
55
|
-
|
|
73
|
+
appBar: /*#__PURE__*/_jsx(ProfileAppBar, {
|
|
74
|
+
titre: traductions.profilePageTitle
|
|
56
75
|
}),
|
|
57
|
-
children: /*#__PURE__*/
|
|
58
|
-
children:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
style: styles.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
children: /*#__PURE__*/_jsx(MyPageContainer, {
|
|
77
|
+
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
78
|
+
contentContainerStyle: styles.contenu,
|
|
79
|
+
showsVerticalScrollIndicator: false,
|
|
80
|
+
children: [/*#__PURE__*/_jsx(ProfilePageAvatar, {}), /*#__PURE__*/_jsx(View, {
|
|
81
|
+
style: styles.gap28
|
|
82
|
+
}), /*#__PURE__*/_jsx(ProfilePageMenu, {
|
|
83
|
+
titre: traductions.profilePageSectionCompte,
|
|
84
|
+
items: menuCompteItems(traductions)
|
|
85
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
86
|
+
style: styles.gap24
|
|
87
|
+
}), assistance.length > 0 && /*#__PURE__*/_jsxs(_Fragment, {
|
|
88
|
+
children: [/*#__PURE__*/_jsx(ProfilePageMenu, {
|
|
89
|
+
titre: traductions.profilePageSectionAssistance,
|
|
90
|
+
items: assistance
|
|
91
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
92
|
+
style: styles.gap24
|
|
93
|
+
})]
|
|
94
|
+
}), (hasCgu || hasPoc) && /*#__PURE__*/_jsxs(_Fragment, {
|
|
95
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
96
|
+
style: styles.liens,
|
|
97
|
+
children: [hasCgu && lien(traductions.profilePageCGU, () => Platform.OS !== 'web' ? void AppRouter.push(router, AppRouter.loginCgu) : void launchUrl(cguLink)), hasPoc && lien(traductions.profilePagePC, () => Platform.OS !== 'web' ? void AppRouter.push(router, AppRouter.loginPoc) : void launchUrl(pocLink))]
|
|
98
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
99
|
+
style: styles.gap10
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
102
|
+
accessibilityRole: "link",
|
|
103
|
+
disabled: Platform.OS === 'web',
|
|
104
|
+
onPress: () => void launchUrl(Platform.OS === 'ios' ? AppEnv.appstoreLink : AppEnv.playstoreLink),
|
|
105
|
+
style: [styles.version, {
|
|
106
|
+
backgroundColor: withAlpha(Themer.neural03Color, 0.12)
|
|
76
107
|
}],
|
|
77
|
-
children:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
onPress: () => Platform.OS !== 'web' ? void AppRouter.push(router, AppRouter.loginPoc) : void launchUrl(AppEnv.pocLink),
|
|
83
|
-
children: traductions.profilePagePC
|
|
108
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
109
|
+
style: [theme.textTheme.labelLarge, {
|
|
110
|
+
color: Themer.neural03Color
|
|
111
|
+
}],
|
|
112
|
+
children: `${traductions.profilePageAppVersion} ${AppEnv.version}`
|
|
84
113
|
})
|
|
85
114
|
})]
|
|
86
|
-
})
|
|
87
|
-
textStyle: [theme.textTheme.displaySmall, styles.version],
|
|
88
|
-
onPress: () => void launchUrl(Platform.OS === 'ios' ? AppEnv.appstoreLink : AppEnv.playstoreLink),
|
|
89
|
-
children: `${traductions.profilePageAppVersion} ${AppEnv.version}`
|
|
90
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
91
|
-
style: styles.gap10
|
|
92
|
-
})]
|
|
115
|
+
})
|
|
93
116
|
})
|
|
94
117
|
});
|
|
95
118
|
}
|
|
96
119
|
const styles = StyleSheet.create({
|
|
97
|
-
|
|
98
|
-
|
|
120
|
+
contenu: {
|
|
121
|
+
paddingTop: 4,
|
|
122
|
+
paddingBottom: 16
|
|
99
123
|
},
|
|
100
|
-
|
|
124
|
+
liens: {
|
|
101
125
|
flexDirection: 'row',
|
|
126
|
+
flexWrap: 'wrap',
|
|
127
|
+
justifyContent: 'center',
|
|
102
128
|
alignItems: 'center',
|
|
103
|
-
|
|
104
|
-
paddingVertical: 10
|
|
129
|
+
columnGap: 12
|
|
105
130
|
},
|
|
106
|
-
|
|
107
|
-
paddingHorizontal:
|
|
131
|
+
lien: {
|
|
132
|
+
paddingHorizontal: 4,
|
|
133
|
+
paddingVertical: 6,
|
|
134
|
+
borderRadius: 6
|
|
108
135
|
},
|
|
109
136
|
version: {
|
|
110
|
-
|
|
111
|
-
|
|
137
|
+
alignSelf: 'center',
|
|
138
|
+
paddingHorizontal: 12,
|
|
139
|
+
paddingVertical: 6,
|
|
140
|
+
borderRadius: 20
|
|
112
141
|
},
|
|
113
142
|
gap10: {
|
|
114
143
|
height: 10
|
|
115
144
|
},
|
|
116
|
-
|
|
117
|
-
height:
|
|
145
|
+
gap24: {
|
|
146
|
+
height: 24
|
|
147
|
+
},
|
|
148
|
+
gap28: {
|
|
149
|
+
height: 28
|
|
118
150
|
}
|
|
119
151
|
});
|
|
120
152
|
//# sourceMappingURL=profile_page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Linking","Platform","StyleSheet","Text","View","Images","AppEnv","Logger","AppRouter","useAppRouter","Themer","useTheme","useAppLocalizations","
|
|
1
|
+
{"version":3,"names":["Linking","Platform","Pressable","ScrollView","StyleSheet","Text","View","Images","AppEnv","Logger","AppRouter","useAppRouter","Themer","useTheme","useAppLocalizations","Scaffold","withAlpha","MyPageContainer","ProfileAppBar","ProfilePageMenu","ProfileItem","ProfilePageAvatar","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","logger","launchUrl","url","openURL","d","menuCompteItems","traductions","items","iconsCircleUser","profilePageMenuCompteTitle","profileCompte","iconsSetting","profilePageMenuParametreTitle","profileParametre","OS","push","iconTransactionSendByAlias","profilePageMenuAliasContactTitle","profileContacts","menuAssistanceItems","aideLink","length","iconsHelp","profilePageMenuHelpTitle","profileHelpCenter","ProfilePage","theme","router","assistance","cguLink","pocLink","hasCgu","hasPoc","lienStyle","textTheme","displaySmall","color","neural03Color","textDecorationLine","textAlign","lien","texte","onPress","accessibilityRole","style","styles","children","appBar","titre","profilePageTitle","contentContainerStyle","contenu","showsVerticalScrollIndicator","gap28","profilePageSectionCompte","gap24","profilePageSectionAssistance","liens","profilePageCGU","loginCgu","profilePagePC","loginPoc","gap10","disabled","appstoreLink","playstoreLink","version","backgroundColor","labelLarge","profilePageAppVersion","create","paddingTop","paddingBottom","flexDirection","flexWrap","justifyContent","alignItems","columnGap","paddingHorizontal","paddingVertical","borderRadius","alignSelf","height"],"sourceRoot":"../../../../../../src","sources":["modules/profile/presentation/pages/profile_page.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE/F,SAASC,MAAM,QAAQ,4BAAyB;AAChD,SAASC,MAAM,QAAQ,yBAAsB;AAC7C,SAASC,MAAM,QAAQ,4BAAyB;AAChD,SAASC,SAAS,EAAEC,YAAY,QAAQ,4BAAyB;AACjE,SAASC,MAAM,EAAEC,QAAQ,QAAQ,2BAAwB;AAEzD,SAASC,mBAAmB,QAAQ,mCAAgC;AACpE,SAASC,QAAQ,QAAQ,yCAAsC;AAC/D,SAASC,SAAS,QAAQ,mCAAgC;AAC1D,SAASC,eAAe,QAAQ,iDAA8C;AAC9E,SAASC,aAAa,QAAQ,sBAAmB;AACjD,SAASC,eAAe,EAAEC,WAAW,QAAQ,mBAAgB;AAC7D,SAASC,iBAAiB,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1D,MAAMC,MAAM,GAAG,IAAInB,MAAM,CAAC,CAAC;AAE3B,eAAeoB,SAASA,CAACC,GAAW,EAAiB;EACnD,IAAI;IACF,MAAM9B,OAAO,CAAC+B,OAAO,CAACD,GAAG,CAAC;EAC5B,CAAC,CAAC,MAAM;IACNF,MAAM,CAACI,CAAC,CAAC,wBAAwBF,GAAG,EAAE,CAAC;EACzC;AACF;AAEA,SAASG,eAAeA,CAACC,WAA6B,EAAiB;EACrE,MAAMC,KAAK,GAAG;EACZ;EACA,IAAIf,WAAW,CAACb,MAAM,CAAC6B,eAAe,EAAEF,WAAW,CAACG,0BAA0B,EAAE3B,SAAS,CAAC4B,aA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