@alveole/components 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/AppUpdateProvider/AppUpdateProvider.d.ts +19 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.d.ts.map +1 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.js +81 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.d.ts +57 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.d.ts.map +1 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.js +58 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.sources.d.ts +9 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.sources.d.ts.map +1 -0
- package/dist/core/AppUpdateProvider/AppUpdateProvider.stories.sources.js +12 -0
- package/dist/core/AppUpdateProvider/index.d.ts +2 -0
- package/dist/core/AppUpdateProvider/index.d.ts.map +1 -0
- package/dist/core/AppUpdateProvider/index.js +1 -0
- package/dist/core/UpdateRequired/UpdateRequired.d.ts +8 -0
- package/dist/core/UpdateRequired/UpdateRequired.d.ts.map +1 -0
- package/dist/core/UpdateRequired/UpdateRequired.js +8 -0
- package/dist/core/UpdateRequired/index.d.ts +2 -0
- package/dist/core/UpdateRequired/index.d.ts.map +1 -0
- package/dist/core/UpdateRequired/index.js +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/ui/DateInput/DateInput.ios.d.ts +1 -1
- package/dist/ui/DateInput/DateInput.stories.d.ts +1 -1
- package/dist/ui/DateInput/DateInput.web.d.ts +1 -1
- package/dist/ui/LucideIcon/LucideIcon.props.d.ts +2 -2
- package/dist/ui/LucideIcon/LucideIcon.stories.d.ts +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type AppUpdateState = {
|
|
3
|
+
isChecking: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const useAppUpdateState: () => AppUpdateState;
|
|
6
|
+
export type AppUpdateProviderProps = React.PropsWithChildren<{
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
/** Numeric App Store Connect ID (e.g. '6759812160'). Required on iOS. */
|
|
11
|
+
iosAppId: string;
|
|
12
|
+
/** Android package name. Defaults to Application.applicationId if omitted. */
|
|
13
|
+
androidPackageId?: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const THROTTLE_MS: number;
|
|
16
|
+
export declare const shouldRunCheck: (lastCheckedAt: number, now: number) => boolean;
|
|
17
|
+
export declare const AppUpdateProvider: (props: AppUpdateProviderProps) => React.JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=AppUpdateProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppUpdateProvider.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/AppUpdateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,cAAc,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAI9C,eAAO,MAAM,iBAAiB,QAAO,cAIpC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW,QAAsB,CAAC;AAE/C,eAAO,MAAM,cAAc,GAAI,eAAe,MAAM,EAAE,KAAK,MAAM,KAAG,OAA6C,CAAC;AAclH,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,sBAwE9D,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as Application from 'expo-application';
|
|
3
|
+
import { checkForUpdate, startUpdate } from 'expo-in-app-updates';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { AppState, Linking, Platform } from 'react-native';
|
|
6
|
+
import { UpdateRequired } from '../UpdateRequired';
|
|
7
|
+
const AppUpdateContext = React.createContext(null);
|
|
8
|
+
export const useAppUpdateState = () => {
|
|
9
|
+
const ctx = React.useContext(AppUpdateContext);
|
|
10
|
+
if (!ctx)
|
|
11
|
+
throw new Error('useAppUpdateState must be used inside AppUpdateProvider');
|
|
12
|
+
return ctx;
|
|
13
|
+
};
|
|
14
|
+
const DEFAULT_TITLE = "Une mise à jour de l'application est nécessaire.";
|
|
15
|
+
const DEFAULT_DESCRIPTION = "La version actuelle de votre application n'est plus valide. Téléchargez la nouvelle version de l'application pour continuer.";
|
|
16
|
+
const DEFAULT_BUTTON_LABEL = 'Mettre à jour';
|
|
17
|
+
export const THROTTLE_MS = 12 * 60 * 60 * 1000; // 12h
|
|
18
|
+
export const shouldRunCheck = (lastCheckedAt, now) => now - lastCheckedAt >= THROTTLE_MS;
|
|
19
|
+
const reducer = (state, action) => {
|
|
20
|
+
switch (action.type) {
|
|
21
|
+
case 'CHECK_COMPLETE':
|
|
22
|
+
return { ...state, isChecking: false };
|
|
23
|
+
case 'UPDATE_REQUIRED':
|
|
24
|
+
return { isChecking: false, isUpdateRequired: true };
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export const AppUpdateProvider = (props) => {
|
|
28
|
+
const { children, title = DEFAULT_TITLE, description = DEFAULT_DESCRIPTION, buttonLabel = DEFAULT_BUTTON_LABEL, iosAppId, androidPackageId, } = props;
|
|
29
|
+
const [{ isChecking, isUpdateRequired }, dispatch] = React.useReducer(reducer, {
|
|
30
|
+
// On web, in-app updates are not supported — skip the check entirely
|
|
31
|
+
isChecking: Platform.OS !== 'web',
|
|
32
|
+
isUpdateRequired: false,
|
|
33
|
+
});
|
|
34
|
+
const lastCheckedAt = React.useRef(0);
|
|
35
|
+
const openStore = React.useCallback(() => {
|
|
36
|
+
if (Platform.OS === 'ios') {
|
|
37
|
+
Linking.openURL(`https://apps.apple.com/app/id${iosAppId}`);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const pkg = androidPackageId ?? Application.applicationId ?? '';
|
|
41
|
+
Linking.openURL(`market://details?id=${pkg}`);
|
|
42
|
+
}
|
|
43
|
+
}, [iosAppId, androidPackageId]);
|
|
44
|
+
const runCheck = React.useCallback(async (isInitial = false) => {
|
|
45
|
+
const now = Date.now();
|
|
46
|
+
if (!isInitial && !shouldRunCheck(lastCheckedAt.current, now))
|
|
47
|
+
return;
|
|
48
|
+
lastCheckedAt.current = now;
|
|
49
|
+
try {
|
|
50
|
+
const { updateAvailable } = await checkForUpdate();
|
|
51
|
+
if (updateAvailable) {
|
|
52
|
+
if (Platform.OS === 'android') {
|
|
53
|
+
await startUpdate(true);
|
|
54
|
+
// If we reach here the immediate update was cancelled or failed → fallback to screen
|
|
55
|
+
}
|
|
56
|
+
dispatch({ type: 'UPDATE_REQUIRED' });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// Check failed: don't block the user
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
dispatch({ type: 'CHECK_COMPLETE' });
|
|
64
|
+
}
|
|
65
|
+
}, [dispatch]);
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
if (Platform.OS === 'web')
|
|
68
|
+
return;
|
|
69
|
+
runCheck(true);
|
|
70
|
+
}, [runCheck]);
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
if (Platform.OS === 'web')
|
|
73
|
+
return;
|
|
74
|
+
const subscription = AppState.addEventListener('change', state => {
|
|
75
|
+
if (state === 'active')
|
|
76
|
+
runCheck(false);
|
|
77
|
+
});
|
|
78
|
+
return () => subscription.remove();
|
|
79
|
+
}, [runCheck]);
|
|
80
|
+
return (_jsx(AppUpdateContext.Provider, { value: { isChecking }, children: !isChecking && isUpdateRequired ? (_jsx(UpdateRequired, { title: title, description: description, buttonLabel: buttonLabel, onUpdate: openStore })) : (children) }));
|
|
81
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: "core"[];
|
|
4
|
+
experimental: false;
|
|
5
|
+
description: string;
|
|
6
|
+
shortDescription: string;
|
|
7
|
+
component: (props: import("./AppUpdateProvider").AppUpdateProviderProps) => import("react").JSX.Element;
|
|
8
|
+
styleFn: () => string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
/**
|
|
12
|
+
* Rendu de l'écran affiché quand une mise à jour est disponible.
|
|
13
|
+
*
|
|
14
|
+
* En production, cet écran s'affiche automatiquement via `AppUpdateProvider`
|
|
15
|
+
* quand `expo-in-app-updates` détecte une nouvelle version sur les stores.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EcranMiseAJour: () => import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Intégration dans `app/_layout.tsx`, à placer à l'intérieur de `TranslationProvider`
|
|
20
|
+
* pour pouvoir surcharger les textes avec les traductions de l'app.
|
|
21
|
+
*
|
|
22
|
+
* - `iosAppId` : identifiant numérique App Store Connect (ex. `'6759812160'`), obligatoire.
|
|
23
|
+
* - `androidPackageId` : **ne pas passer** — récupéré automatiquement via `Application.applicationId` au runtime.
|
|
24
|
+
* - `title`, `description`, `buttonLabel` : optionnels, des valeurs françaises par défaut sont intégrées.
|
|
25
|
+
*
|
|
26
|
+
* ## Comportement par plateforme
|
|
27
|
+
*
|
|
28
|
+
* - **iOS** : affiche l'écran `UpdateRequired` avec un bouton qui ouvre l'App Store.
|
|
29
|
+
* - **Android** : déclenche automatiquement le flow de mise à jour immédiat du Play Store (`startUpdate(true)`).
|
|
30
|
+
* Si l'utilisateur annule ou si ça échoue, l'écran s'affiche en fallback.
|
|
31
|
+
* - **Web** : aucun blocage — `expo-in-app-updates` n'est pas supporté sur web.
|
|
32
|
+
*
|
|
33
|
+
* ## Throttle
|
|
34
|
+
*
|
|
35
|
+
* Le check est effectué au démarrage de l'app, puis à chaque retour en foreground,
|
|
36
|
+
* mais au maximum une fois toutes les 12h pour éviter des appels réseau inutiles.
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // app/_layout.tsx
|
|
40
|
+
* const AppGate = () => {
|
|
41
|
+
* const { t } = useTranslation();
|
|
42
|
+
* return (
|
|
43
|
+
* <AppUpdateProvider
|
|
44
|
+
* iosAppId={constantExtras.IOS_STORE_ID ?? ''}
|
|
45
|
+
* title={t('screens.updateRequired.title')}
|
|
46
|
+
* description={t('screens.updateRequired.description')}
|
|
47
|
+
* buttonLabel={t('actions.update')}
|
|
48
|
+
* >
|
|
49
|
+
* <Slot />
|
|
50
|
+
* </AppUpdateProvider>
|
|
51
|
+
* );
|
|
52
|
+
* };
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare const Integration: () => null;
|
|
56
|
+
export * as Sources from './AppUpdateProvider.stories.sources';
|
|
57
|
+
//# sourceMappingURL=AppUpdateProvider.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppUpdateProvider.stories.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/AppUpdateProvider.stories.tsx"],"names":[],"mappings":";;;;;;;;;AAIA,wBASkB;AAElB;;;;;GAKG;AACH,eAAO,MAAM,cAAc,mCAO1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,WAAW,YAAa,CAAC;AAEtC,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { UpdateRequired } from '../UpdateRequired';
|
|
3
|
+
import { AppUpdateProvider } from './AppUpdateProvider';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'AppUpdateProvider',
|
|
6
|
+
tags: ['core'],
|
|
7
|
+
experimental: false,
|
|
8
|
+
description: "Bloque l'app et affiche un écran de mise à jour forcée quand une nouvelle version native est disponible sur les stores (App Store / Play Store).",
|
|
9
|
+
shortDescription: "Bloque l'app si une nouvelle version native est disponible.",
|
|
10
|
+
component: AppUpdateProvider,
|
|
11
|
+
styleFn: () => 'Aucun style appliqué',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Rendu de l'écran affiché quand une mise à jour est disponible.
|
|
15
|
+
*
|
|
16
|
+
* En production, cet écran s'affiche automatiquement via `AppUpdateProvider`
|
|
17
|
+
* quand `expo-in-app-updates` détecte une nouvelle version sur les stores.
|
|
18
|
+
*/
|
|
19
|
+
export const EcranMiseAJour = () => (_jsx(UpdateRequired, { title: "Une mise \u00E0 jour de l'application est n\u00E9cessaire.", description: "La version actuelle de votre application n'est plus valide. T\u00E9l\u00E9chargez la nouvelle version de l'application pour continuer.", buttonLabel: "Mettre \u00E0 jour", onUpdate: () => { } }));
|
|
20
|
+
/**
|
|
21
|
+
* Intégration dans `app/_layout.tsx`, à placer à l'intérieur de `TranslationProvider`
|
|
22
|
+
* pour pouvoir surcharger les textes avec les traductions de l'app.
|
|
23
|
+
*
|
|
24
|
+
* - `iosAppId` : identifiant numérique App Store Connect (ex. `'6759812160'`), obligatoire.
|
|
25
|
+
* - `androidPackageId` : **ne pas passer** — récupéré automatiquement via `Application.applicationId` au runtime.
|
|
26
|
+
* - `title`, `description`, `buttonLabel` : optionnels, des valeurs françaises par défaut sont intégrées.
|
|
27
|
+
*
|
|
28
|
+
* ## Comportement par plateforme
|
|
29
|
+
*
|
|
30
|
+
* - **iOS** : affiche l'écran `UpdateRequired` avec un bouton qui ouvre l'App Store.
|
|
31
|
+
* - **Android** : déclenche automatiquement le flow de mise à jour immédiat du Play Store (`startUpdate(true)`).
|
|
32
|
+
* Si l'utilisateur annule ou si ça échoue, l'écran s'affiche en fallback.
|
|
33
|
+
* - **Web** : aucun blocage — `expo-in-app-updates` n'est pas supporté sur web.
|
|
34
|
+
*
|
|
35
|
+
* ## Throttle
|
|
36
|
+
*
|
|
37
|
+
* Le check est effectué au démarrage de l'app, puis à chaque retour en foreground,
|
|
38
|
+
* mais au maximum une fois toutes les 12h pour éviter des appels réseau inutiles.
|
|
39
|
+
*
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // app/_layout.tsx
|
|
42
|
+
* const AppGate = () => {
|
|
43
|
+
* const { t } = useTranslation();
|
|
44
|
+
* return (
|
|
45
|
+
* <AppUpdateProvider
|
|
46
|
+
* iosAppId={constantExtras.IOS_STORE_ID ?? ''}
|
|
47
|
+
* title={t('screens.updateRequired.title')}
|
|
48
|
+
* description={t('screens.updateRequired.description')}
|
|
49
|
+
* buttonLabel={t('actions.update')}
|
|
50
|
+
* >
|
|
51
|
+
* <Slot />
|
|
52
|
+
* </AppUpdateProvider>
|
|
53
|
+
* );
|
|
54
|
+
* };
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export const Integration = () => null;
|
|
58
|
+
export * as Sources from './AppUpdateProvider.stories.sources';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const EcranMiseAJour: () => string;
|
|
2
|
+
export declare const Integration: () => string;
|
|
3
|
+
export declare const storySources: {
|
|
4
|
+
readonly EcranMiseAJour: () => string;
|
|
5
|
+
readonly Integration: () => string;
|
|
6
|
+
};
|
|
7
|
+
export type StorySourceName = keyof typeof storySources;
|
|
8
|
+
export declare const storyDescriptions: Partial<Record<StorySourceName, string>>;
|
|
9
|
+
//# sourceMappingURL=AppUpdateProvider.stories.sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppUpdateProvider.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/AppUpdateProvider.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,cAA2V,CAAC;AAEvX,eAAO,MAAM,WAAW,cAAiD,CAAC;AAE1E,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAGtE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file is generated. Do not edit manually.
|
|
2
|
+
// Source: src/core/AppUpdateProvider/AppUpdateProvider.stories.tsx
|
|
3
|
+
export const EcranMiseAJour = () => "export const EcranMiseAJour = () => (\n <UpdateRequired\n title=\"Une mise à jour de l'application est nécessaire.\"\n description=\"La version actuelle de votre application n'est plus valide. Téléchargez la nouvelle version de l'application pour continuer.\"\n buttonLabel=\"Mettre à jour\"\n onUpdate={() => {}}\n />\n);";
|
|
4
|
+
export const Integration = () => "export const Integration = () => null;";
|
|
5
|
+
export const storySources = {
|
|
6
|
+
EcranMiseAJour,
|
|
7
|
+
Integration,
|
|
8
|
+
};
|
|
9
|
+
export const storyDescriptions = {
|
|
10
|
+
EcranMiseAJour: "Rendu de l'écran affiché quand une mise à jour est disponible.\n\nEn production, cet écran s'affiche automatiquement via `AppUpdateProvider`\nquand `expo-in-app-updates` détecte une nouvelle version sur les stores.",
|
|
11
|
+
Integration: "Intégration dans `app/_layout.tsx`, à placer à l'intérieur de `TranslationProvider`\npour pouvoir surcharger les textes avec les traductions de l'app.\n\n- `iosAppId` : identifiant numérique App Store Connect (ex. `'6759812160'`), obligatoire.\n- `androidPackageId` : **ne pas passer** — récupéré automatiquement via `Application.applicationId` au runtime.\n- `title`, `description`, `buttonLabel` : optionnels, des valeurs françaises par défaut sont intégrées.\n\n## Comportement par plateforme\n\n- **iOS** : affiche l'écran `UpdateRequired` avec un bouton qui ouvre l'App Store.\n- **Android** : déclenche automatiquement le flow de mise à jour immédiat du Play Store (`startUpdate(true)`).\n Si l'utilisateur annule ou si ça échoue, l'écran s'affiche en fallback.\n- **Web** : aucun blocage — `expo-in-app-updates` n'est pas supporté sur web.\n\n## Throttle\n\nLe check est effectué au démarrage de l'app, puis à chaque retour en foreground,\nmais au maximum une fois toutes les 12h pour éviter des appels réseau inutiles.\n\n```tsx\n// app/_layout.tsx\nconst AppGate = () => {\n const { t } = useTranslation();\n return (\n <AppUpdateProvider\n iosAppId={constantExtras.IOS_STORE_ID ?? ''}\n title={t('screens.updateRequired.title')}\n description={t('screens.updateRequired.description')}\n buttonLabel={t('actions.update')}\n >\n <Slot />\n </AppUpdateProvider>\n );\n};\n```",
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppUpdateProvider';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type UpdateRequiredProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
buttonLabel: string;
|
|
5
|
+
onUpdate: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const UpdateRequired: (props: UpdateRequiredProps) => import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=UpdateRequired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateRequired.d.ts","sourceRoot":"","sources":["../../../src/core/UpdateRequired/UpdateRequired.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCAaxD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../ui/Button';
|
|
3
|
+
import { EmptyState } from '../../ui/EmptyState';
|
|
4
|
+
import { Box } from '../Box';
|
|
5
|
+
export const UpdateRequired = (props) => {
|
|
6
|
+
const { title, description, buttonLabel, onUpdate } = props;
|
|
7
|
+
return (_jsx(Box, { tag: "update-required", flex: 1, style: { alignItems: 'center', justifyContent: 'center' }, children: _jsx(EmptyState, { title: title, description: description, iconName: "RefreshCw", actions: _jsx(Button, { variant: "primary", title: buttonLabel, onPress: onUpdate }) }) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/UpdateRequired/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './UpdateRequired';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './A';
|
|
2
2
|
export * from './Alert';
|
|
3
3
|
export * from './AnchorHeading';
|
|
4
|
+
export * from './AppUpdateProvider';
|
|
4
5
|
export * from './Box';
|
|
5
6
|
export * from './Code';
|
|
6
7
|
export * from './Form';
|
|
@@ -14,5 +15,6 @@ export * from './Page';
|
|
|
14
15
|
export * from './PdfViewer';
|
|
15
16
|
export * from './Section';
|
|
16
17
|
export * from './Typography';
|
|
18
|
+
export * from './UpdateRequired';
|
|
17
19
|
export * from './Version';
|
|
18
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC;AACpB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC;AACpB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './A';
|
|
2
2
|
export * from './Alert';
|
|
3
3
|
export * from './AnchorHeading';
|
|
4
|
+
export * from './AppUpdateProvider';
|
|
4
5
|
export * from './Box';
|
|
5
6
|
export * from './Code';
|
|
6
7
|
export * from './Form';
|
|
@@ -14,4 +15,5 @@ export * from './Page';
|
|
|
14
15
|
export * from './PdfViewer';
|
|
15
16
|
export * from './Section';
|
|
16
17
|
export * from './Typography';
|
|
18
|
+
export * from './UpdateRequired';
|
|
17
19
|
export * from './Version';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "1.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "1.3.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "1.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "1.3.0";
|
|
@@ -20,6 +20,6 @@ export declare const DateInput: React.ForwardRefExoticComponent<Omit<import("rea
|
|
|
20
20
|
maximumDate?: Date;
|
|
21
21
|
onChange?: (date: string) => void;
|
|
22
22
|
is24Hour?: boolean;
|
|
23
|
-
minuteInterval?: 1 | 6 | 4 | 12 | 2 |
|
|
23
|
+
minuteInterval?: 1 | 6 | 4 | 12 | 2 | 5 | 3 | 10 | 15 | 20 | 30;
|
|
24
24
|
} & React.RefAttributes<any>>;
|
|
25
25
|
//# sourceMappingURL=DateInput.ios.d.ts.map
|
|
@@ -25,7 +25,7 @@ declare const _default: {
|
|
|
25
25
|
maximumDate?: Date;
|
|
26
26
|
onChange?: (date: string) => void;
|
|
27
27
|
is24Hour?: boolean;
|
|
28
|
-
minuteInterval?: 1 | 6 | 4 | 12 | 2 |
|
|
28
|
+
minuteInterval?: 1 | 6 | 4 | 12 | 2 | 5 | 3 | 10 | 15 | 20 | 30;
|
|
29
29
|
} & React.RefAttributes<any>>;
|
|
30
30
|
styleFn: () => {
|
|
31
31
|
dateInput: {};
|
|
@@ -20,6 +20,6 @@ export declare const DateInput: React.ForwardRefExoticComponent<Omit<import("rea
|
|
|
20
20
|
maximumDate?: Date;
|
|
21
21
|
onChange?: (date: string) => void;
|
|
22
22
|
is24Hour?: boolean;
|
|
23
|
-
minuteInterval?: 1 | 6 | 4 | 12 | 2 |
|
|
23
|
+
minuteInterval?: 1 | 6 | 4 | 12 | 2 | 5 | 3 | 10 | 15 | 20 | 30;
|
|
24
24
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
25
25
|
//# sourceMappingURL=DateInput.web.d.ts.map
|
|
@@ -8,10 +8,10 @@ export type IconName = LucideIconName | LabIconName;
|
|
|
8
8
|
export declare const isLucideIconName: (name: string) => name is LucideIconName;
|
|
9
9
|
declare const PublicPropsSchema: z.ZodObject<{
|
|
10
10
|
size: z.ZodEnum<{
|
|
11
|
+
xs: "xs";
|
|
11
12
|
sm: "sm";
|
|
12
13
|
md: "md";
|
|
13
14
|
lg: "lg";
|
|
14
|
-
xs: "xs";
|
|
15
15
|
xl: "xl";
|
|
16
16
|
}>;
|
|
17
17
|
name: z.ZodEnum<{
|
|
@@ -6387,10 +6387,10 @@ type PrivateProps = {
|
|
|
6387
6387
|
export type LucideIconProps = z.infer<typeof PublicPropsSchema> & PrivateProps;
|
|
6388
6388
|
export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
6389
6389
|
size: z.ZodEnum<{
|
|
6390
|
+
xs: "xs";
|
|
6390
6391
|
sm: "sm";
|
|
6391
6392
|
md: "md";
|
|
6392
6393
|
lg: "lg";
|
|
6393
|
-
xs: "xs";
|
|
6394
6394
|
xl: "xl";
|
|
6395
6395
|
}>;
|
|
6396
6396
|
name: z.ZodEnum<{
|
|
@@ -7,10 +7,10 @@ declare const _default: {
|
|
|
7
7
|
shortDescription: string;
|
|
8
8
|
props: import("zod/v4/core").ZodStandardJSONSchemaPayload<import("zod").ZodObject<{
|
|
9
9
|
size: import("zod").ZodEnum<{
|
|
10
|
+
xs: "xs";
|
|
10
11
|
sm: "sm";
|
|
11
12
|
md: "md";
|
|
12
13
|
lg: "lg";
|
|
13
|
-
xs: "xs";
|
|
14
14
|
xl: "xl";
|
|
15
15
|
}>;
|
|
16
16
|
name: import("zod").ZodEnum<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alveole/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Shared UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,10 +46,12 @@
|
|
|
46
46
|
"babel-preset-expo": "56.0.17",
|
|
47
47
|
"eslint": "9.39.5",
|
|
48
48
|
"expo": "56.0.18",
|
|
49
|
+
"expo-application": "56.0.3",
|
|
49
50
|
"expo-asset": "56.0.21",
|
|
50
51
|
"expo-document-picker": "56.0.4",
|
|
51
|
-
"expo-
|
|
52
|
+
"expo-in-app-updates": "0.12.0",
|
|
52
53
|
"expo-modules-core": "56.0.22",
|
|
54
|
+
"expo-router": "56.2.17",
|
|
53
55
|
"jest": "29.7.0",
|
|
54
56
|
"jest-expo": "56.0.5",
|
|
55
57
|
"lucide-react-native": "1.23.0",
|
|
@@ -74,8 +76,8 @@
|
|
|
74
76
|
"@alveole/core": "*",
|
|
75
77
|
"@alveole/theme": "*",
|
|
76
78
|
"@lottiefiles/dotlottie-react": "*",
|
|
77
|
-
"@react-native-community/datetimepicker": "*",
|
|
78
79
|
"@lucide/lab": "*",
|
|
80
|
+
"@react-native-community/datetimepicker": "*",
|
|
79
81
|
"@react-native-picker/picker": ">=2",
|
|
80
82
|
"@shopify/flash-list": ">=2",
|
|
81
83
|
"@tamagui/accordion": "^1.129.0 <2.0.0",
|
|
@@ -92,25 +94,26 @@
|
|
|
92
94
|
"@tamagui/tabs": "^1.129.0 <2.0.0",
|
|
93
95
|
"@tamagui/toast": "^1.129.0 <2.0.0",
|
|
94
96
|
"@uiw/react-signature": "*",
|
|
97
|
+
"date-fns": "*",
|
|
95
98
|
"expo-application": "*",
|
|
96
99
|
"expo-asset": "*",
|
|
97
100
|
"expo-constants": "*",
|
|
98
101
|
"expo-document-picker": "*",
|
|
99
102
|
"expo-image": "*",
|
|
103
|
+
"expo-in-app-updates": "*",
|
|
100
104
|
"expo-linear-gradient": "*",
|
|
101
105
|
"expo-router": "*",
|
|
102
106
|
"lottie-react-native": "*",
|
|
103
107
|
"lucide-react-native": ">=0.570.0",
|
|
104
108
|
"pdfjs-dist": "^4.0.0 || ^5.0.0 || ^6.0.0",
|
|
105
|
-
"date-fns": "*",
|
|
106
109
|
"react": "*",
|
|
107
110
|
"react-native": "*",
|
|
108
111
|
"react-native-code-highlighter": "*",
|
|
112
|
+
"react-native-keyboard-controller": ">=1.21.0",
|
|
109
113
|
"react-native-otp-entry": "*",
|
|
110
114
|
"react-native-safe-area-context": "*",
|
|
111
115
|
"react-native-signature-canvas": "*",
|
|
112
116
|
"react-native-svg": "^15.0.0",
|
|
113
|
-
"react-native-keyboard-controller": ">=1.21.0",
|
|
114
117
|
"react-native-webview": ">=13",
|
|
115
118
|
"react-select": ">=5",
|
|
116
119
|
"react-syntax-highlighter": "*",
|