@pi-spi/app 1.6.0 → 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 +14 -0
- package/lib/module/l10n/app_localizations_en.js.map +1 -1
- package/lib/module/l10n/app_localizations_fr.js +14 -0
- package/lib/module/l10n/app_localizations_fr.js.map +1 -1
- package/lib/module/l10n/app_localizations_pt.js +14 -0
- package/lib/module/l10n/app_localizations_pt.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/parametre/profile_parametre_page.js +2 -2
- 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_qrcode.js +2 -2
- 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 +135 -199
- package/lib/module/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.js.map +1 -1
- package/lib/module/modules/profile/presentation/pages/profile_menu.js +4 -3
- package/lib/module/modules/profile/presentation/pages/profile_menu.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_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/widgets/custom_progressbar.js +3 -2
- package/lib/module/shared/widgets/custom_progressbar.js.map +1 -1
- package/lib/module/shared/widgets/selection.js +1 -1
- package/lib/module/shared/widgets/selection.js.map +1 -1
- 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 +28 -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/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/parametre/profile_parametre_page.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/shared/widgets/custom_progressbar.d.ts.map +1 -1
- package/lib/typescript/src/shared/widgets/selection.d.ts +1 -1
- package/lib/typescript/src/shared/widgets/selection.d.ts.map +1 -1
- 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 +28 -0
- package/src/l10n/app_localizations_en.ts +14 -0
- package/src/l10n/app_localizations_fr.ts +14 -0
- package/src/l10n/app_localizations_pt.ts +14 -0
- 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/parametre/profile_parametre_page.tsx +2 -5
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_qrcode.tsx +2 -2
- package/src/modules/profile/presentation/pages/parametre/profile_parametre_page_theme.tsx +105 -148
- package/src/modules/profile/presentation/pages/profile_menu.tsx +2 -2
- package/src/modules/transactions/presentation/pages/transaction_details/transaction_details_page_recu.tsx +3 -1
- 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/widgets/custom_progressbar.tsx +3 -2
- package/src/shared/widgets/selection.tsx +1 -1
- 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
|
@@ -74,7 +74,7 @@ export function ProfilePageMenu({ items, titre }: { items: (ProfileItem | ReactE
|
|
|
74
74
|
<Card style={styles.card}>
|
|
75
75
|
{lignes.map((ligne, i) => (
|
|
76
76
|
<Fragment key={i}>
|
|
77
|
-
{i > 0 && <View style={styles.separateur} />}
|
|
77
|
+
{i > 0 && <View style={[styles.separateur, { backgroundColor: withAlpha(Themer.neural03Color, 0.25) }]} />}
|
|
78
78
|
{ligne}
|
|
79
79
|
</Fragment>
|
|
80
80
|
))}
|
|
@@ -160,5 +160,5 @@ const styles = StyleSheet.create({
|
|
|
160
160
|
sousTitre: { marginTop: 2 },
|
|
161
161
|
section: { fontSize: 12, letterSpacing: 0.8, fontWeight: '600', marginLeft: 4, marginBottom: 8 },
|
|
162
162
|
// Trait aligné sur le texte (après la pastille)
|
|
163
|
-
separateur: { height: StyleSheet.hairlineWidth, marginLeft: 68
|
|
163
|
+
separateur: { height: StyleSheet.hairlineWidth, marginLeft: 68 },
|
|
164
164
|
});
|
|
@@ -191,7 +191,9 @@ async function buildPdfHtml(
|
|
|
191
191
|
`<tr><td class="label">${escapeHtml(item.label)}</td><td class="value">${escapeHtml(item.value)}</td></tr>`,
|
|
192
192
|
)
|
|
193
193
|
.join('');
|
|
194
|
-
const
|
|
194
|
+
const maintenant = new Date();
|
|
195
|
+
const editeLe = `${new DateFormat('dd/MM/yyyy', locale).format(maintenant)} ${new DateFormat('HH.mm', locale).format(maintenant)}`;
|
|
196
|
+
const generated = escapeHtml(`${traductions.transactionDetailsRecuPdfEditeLe} ${editeLe} © ${AppEnv.appName}`);
|
|
195
197
|
return `<!DOCTYPE html><html><head><meta charset="utf-8" />
|
|
196
198
|
<style>
|
|
197
199
|
@page { size: A4; margin: 40px 48px; }
|
|
@@ -120,7 +120,7 @@ export function TransactionSearchPageFilters() {
|
|
|
120
120
|
/** Titre d'une section de filtres */
|
|
121
121
|
function SectionTitle({ label }: { label: string }) {
|
|
122
122
|
const theme = useTheme();
|
|
123
|
-
return <Text style={[theme.textTheme.displayMedium, styles.sectionTitle]}>{label.toUpperCase()}</Text>;
|
|
123
|
+
return <Text style={[theme.textTheme.displayMedium, styles.sectionTitle, { color: Themer.neural03Color }]}>{label.toUpperCase()}</Text>;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/** Icône dans un carré arrondi */
|
|
@@ -162,8 +162,8 @@ function FiltersDates({
|
|
|
162
162
|
{/* Teinté quand le filtre est actif */}
|
|
163
163
|
<IconBox
|
|
164
164
|
name="calendar-month"
|
|
165
|
-
color={estDefinie ?
|
|
166
|
-
backgroundColor={estDefinie ?
|
|
165
|
+
color={estDefinie ? theme.primaryColorDark : Themer.neural04Color}
|
|
166
|
+
backgroundColor={estDefinie ? theme.colorScheme.secondary : theme.colorScheme.surface}
|
|
167
167
|
/>
|
|
168
168
|
{/* La plage choisie, sinon l'invitation à la choisir */}
|
|
169
169
|
<Text style={[theme.textTheme.headlineSmall, styles.label15, styles.texts]}>
|
|
@@ -254,7 +254,7 @@ const styles = StyleSheet.create({
|
|
|
254
254
|
separateur: { height: StyleSheet.hairlineWidth },
|
|
255
255
|
separateurIndent: { marginLeft: 76, marginRight: 16 },
|
|
256
256
|
content: { paddingHorizontal: 16, paddingTop: 24, paddingBottom: 16 },
|
|
257
|
-
sectionTitle: {
|
|
257
|
+
sectionTitle: { letterSpacing: 0.6, marginLeft: 4, marginBottom: 10 },
|
|
258
258
|
tile: { flexDirection: 'row', alignItems: 'center', paddingLeft: 16, paddingRight: 8, paddingVertical: 10 },
|
|
259
259
|
icon: { width: 44, height: 44, borderRadius: 14, alignItems: 'center', justifyContent: 'center' },
|
|
260
260
|
texts: { flex: 1, marginHorizontal: 16 },
|
|
@@ -61,8 +61,8 @@ export function TransactionSplitPageRepartition({ transaction, contacts }: { tra
|
|
|
61
61
|
{/* Par montant */}
|
|
62
62
|
<TextButton onPress={() => undefined}>
|
|
63
63
|
<View style={styles.row}>
|
|
64
|
-
<Text style={[theme.textTheme.bodySmall, { color:
|
|
65
|
-
<MaterialIcons name="keyboard-arrow-down" size={24} color={
|
|
64
|
+
<Text style={[theme.textTheme.bodySmall, { color: theme.primaryColorDark }]}>{traductions.transactionSplitRepartitionParMontant}</Text>
|
|
65
|
+
<MaterialIcons name="keyboard-arrow-down" size={24} color={theme.primaryColorDark} />
|
|
66
66
|
</View>
|
|
67
67
|
</TextButton>
|
|
68
68
|
</View>
|
package/src/pi_spi_sdk_entry.tsx
CHANGED
|
@@ -179,9 +179,16 @@ function SdkShell({ config, booted }: { config: PiSpiSdkConfig; booted: Booted }
|
|
|
179
179
|
// comme le `buildWhen` du BlocBuilder<ConfigBloc> de Flutter.
|
|
180
180
|
const configState = useBlocBuilder(
|
|
181
181
|
configBloc,
|
|
182
|
-
(_previous, current) =>
|
|
182
|
+
(_previous, current) =>
|
|
183
|
+
current instanceof ConfigLoadedState &&
|
|
184
|
+
(current.updatedKey === ConfigKey.preferedTheme || current.updatedKey === ConfigKey.preferedAccent),
|
|
183
185
|
);
|
|
184
|
-
const
|
|
186
|
+
const params = configState.configParams.params;
|
|
187
|
+
// Thème (système, clair ou sombre) teinté par la couleur d'accentuation ;
|
|
188
|
+
// « Système » suit le téléphone en direct (useColorScheme)
|
|
189
|
+
const theme = Themer.get(params[ConfigKey.preferedTheme], params[ConfigKey.preferedAccent], systemScheme);
|
|
190
|
+
// Couleurs neutres (Themer.neural0x) adaptées au thème affiché
|
|
191
|
+
Themer.suivreLuminosite(theme.brightness);
|
|
185
192
|
const navigationTheme = useMemo(() => toNavigationTheme(theme), [theme]);
|
|
186
193
|
|
|
187
194
|
return (
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import Svg, { Circle } from 'react-native-svg';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { useTheme } from '../../core/theme';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Anneau de progression (≈ `CustomCircularProgressBar`) : cercle de fond
|
|
@@ -25,6 +25,7 @@ export function CustomCircularProgressBar({
|
|
|
25
25
|
strokeWidth?: number;
|
|
26
26
|
children?: ReactNode;
|
|
27
27
|
}) {
|
|
28
|
+
const theme = useTheme();
|
|
28
29
|
const radius = size / 2;
|
|
29
30
|
const box = size + strokeWidth;
|
|
30
31
|
const center = box / 2;
|
|
@@ -38,7 +39,7 @@ export function CustomCircularProgressBar({
|
|
|
38
39
|
cx={center}
|
|
39
40
|
cy={center}
|
|
40
41
|
r={radius}
|
|
41
|
-
stroke={progressColor ??
|
|
42
|
+
stroke={progressColor ?? theme.colorScheme.primary}
|
|
42
43
|
strokeWidth={strokeWidth}
|
|
43
44
|
fill="none"
|
|
44
45
|
strokeLinecap="round"
|
|
@@ -11,7 +11,7 @@ import { withAlpha } from '../utils/color';
|
|
|
11
11
|
* [contenu] (qui défile s'il est trop long : utiliser un ScrollView).
|
|
12
12
|
* À ouvrir avec showModalBottomSheet.
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function SelectionSheet({
|
|
15
15
|
titre,
|
|
16
16
|
titreSize,
|
|
17
17
|
entete,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|