@lystech/core 3.0.143 → 3.0.144
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/index.d.ts +77 -4
- package/dist/lystech-core-provider.es.js +9836 -9636
- package/dist/lystech-core-provider.umd.js +168 -168
- package/dist/lystech-core-styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -282,12 +282,28 @@ declare type BillProduct = {
|
|
|
282
282
|
lastOrderedOn: string;
|
|
283
283
|
};
|
|
284
284
|
|
|
285
|
-
export declare function BirthdayForm({ title }: BirthdayFormProps): JSX.Element | null;
|
|
285
|
+
export declare function BirthdayForm({ title, onRequestChange }: BirthdayFormProps): JSX.Element | null;
|
|
286
286
|
|
|
287
287
|
export declare type BirthdayFormProps = {
|
|
288
288
|
title?: string;
|
|
289
|
+
/**
|
|
290
|
+
* « Demander une correction » (date déjà enregistrée). Défaut : ouvre le
|
|
291
|
+
* formulaire d'aide de la boutique, message pré-rempli (`openSupport`).
|
|
292
|
+
*/
|
|
293
|
+
onRequestChange?: (current: {
|
|
294
|
+
day: number;
|
|
295
|
+
month: number;
|
|
296
|
+
year: number | null;
|
|
297
|
+
}) => void;
|
|
289
298
|
};
|
|
290
299
|
|
|
300
|
+
/** « 17 avril 1992 », « 17 avril » sans année. */
|
|
301
|
+
export declare function birthdayText(d: {
|
|
302
|
+
day?: number;
|
|
303
|
+
month?: number;
|
|
304
|
+
year?: number | null;
|
|
305
|
+
} | null | undefined): string;
|
|
306
|
+
|
|
291
307
|
declare interface CardItem {
|
|
292
308
|
label: default_2.ReactNode;
|
|
293
309
|
labelIcon?: default_2.ReactNode;
|
|
@@ -681,7 +697,7 @@ export declare type LoyaltyPlan = {
|
|
|
681
697
|
stripePriceId: string | null;
|
|
682
698
|
};
|
|
683
699
|
|
|
684
|
-
export declare function LoyaltyPoints({ title, showRewards, historyPreview }: LoyaltyPointsProps): JSX.Element | null;
|
|
700
|
+
export declare function LoyaltyPoints({ title, showRewards, historyPreview, showHistory }: LoyaltyPointsProps): JSX.Element | null;
|
|
685
701
|
|
|
686
702
|
export declare type LoyaltyPointsProps = {
|
|
687
703
|
title?: string;
|
|
@@ -689,6 +705,12 @@ export declare type LoyaltyPointsProps = {
|
|
|
689
705
|
showRewards?: boolean;
|
|
690
706
|
/** Lignes d'historique visibles avant « Voir tout » (défaut : 8). */
|
|
691
707
|
historyPreview?: number;
|
|
708
|
+
/**
|
|
709
|
+
* Montrer la liste « Historique » des mouvements (défaut : oui). Une boutique
|
|
710
|
+
* qui montre les points PAR COMMANDE dans l'historique de commandes
|
|
711
|
+
* (`OrderLoyaltyPoints`) peut la retirer : le solde et les récompenses restent.
|
|
712
|
+
*/
|
|
713
|
+
showHistory?: boolean;
|
|
692
714
|
};
|
|
693
715
|
|
|
694
716
|
export declare type LoyaltyPointsSummary = {
|
|
@@ -738,7 +760,7 @@ export declare const LYSTECH_CORE_VERSION: any;
|
|
|
738
760
|
|
|
739
761
|
export declare function lystechAuthRoutes(): JSX.Element[];
|
|
740
762
|
|
|
741
|
-
declare function LystechCoreProvider({ children, organization, shouldRedirectAfterLogin, loginRedirectRoute, queryClient, usePushNotifications, useProgressiveWebAppFeatures, useThemeProvider, quickGoogleLoginButtonStyle, enableGoogleQuickLoginButton, showGoogleQuickLoginButton, useGoogleAutoSelect, debugMode, showAskPermissionsButtons, hideSupportButton, supportButtonVariant, onPackageUpdated, triggerOnFirstInstallPackageCallback, packageVersionStorageKey, }: Props): JSX.Element;
|
|
763
|
+
declare function LystechCoreProvider({ children, organization, shouldRedirectAfterLogin, loginRedirectRoute, queryClient, usePushNotifications, useProgressiveWebAppFeatures, useThemeProvider, quickGoogleLoginButtonStyle, enableGoogleQuickLoginButton, showGoogleQuickLoginButton, useGoogleAutoSelect, debugMode, showAskPermissionsButtons, hideSupportButton, supportButtonVariant, supportButtonPaths, onPackageUpdated, triggerOnFirstInstallPackageCallback, packageVersionStorageKey, }: Props): JSX.Element;
|
|
742
764
|
export default LystechCoreProvider;
|
|
743
765
|
|
|
744
766
|
export declare function LystechNotFoundPage({ homePath, homeLabel, }?: {
|
|
@@ -841,7 +863,10 @@ export declare type MyBirthday = {
|
|
|
841
863
|
month?: number;
|
|
842
864
|
day?: number;
|
|
843
865
|
source: string | null;
|
|
866
|
+
/** Toujours null depuis la règle « saisie unique » (gardé pour compatibilité). */
|
|
844
867
|
changeAllowedOn: string | null;
|
|
868
|
+
/** Une date existe : le client ne peut plus la changer (demande à l'aide). */
|
|
869
|
+
locked?: boolean;
|
|
845
870
|
};
|
|
846
871
|
|
|
847
872
|
export declare type MyLoyalty = {
|
|
@@ -865,6 +890,13 @@ export declare type MyLoyalty = {
|
|
|
865
890
|
points: LoyaltyPointsSummary | null;
|
|
866
891
|
};
|
|
867
892
|
|
|
893
|
+
export declare function openSupport(options?: OpenSupportOptions): boolean;
|
|
894
|
+
|
|
895
|
+
export declare type OpenSupportOptions = {
|
|
896
|
+
/** Texte placé dans le champ « message » (le client peut le modifier). */
|
|
897
|
+
message?: string;
|
|
898
|
+
};
|
|
899
|
+
|
|
868
900
|
declare type OrderBreakdown = {
|
|
869
901
|
products: {
|
|
870
902
|
UID: string;
|
|
@@ -930,6 +962,25 @@ declare type OrderBreakdown = {
|
|
|
930
962
|
}[];
|
|
931
963
|
};
|
|
932
964
|
|
|
965
|
+
/** « +50 points · utilisables le 26 octobre » ; « 25 points retirés (commande remboursée) ». */
|
|
966
|
+
export declare function OrderLoyaltyPoints({ billUID, className }: OrderLoyaltyPointsProps): JSX.Element | null;
|
|
967
|
+
|
|
968
|
+
export declare type OrderLoyaltyPointsProps = {
|
|
969
|
+
billUID: string;
|
|
970
|
+
className?: string;
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
export declare type OrderPoints = {
|
|
974
|
+
/** Points gagnés par cette commande (somme des gains). */
|
|
975
|
+
earned: number;
|
|
976
|
+
/** Points retirés (remboursement, annulation), en positif. */
|
|
977
|
+
reversed: number;
|
|
978
|
+
/** earned − reversed. */
|
|
979
|
+
net: number;
|
|
980
|
+
/** Gain encore en attente (délai de retour) : date où il devient utilisable. */
|
|
981
|
+
pendingUntil: string | null;
|
|
982
|
+
};
|
|
983
|
+
|
|
933
984
|
export declare function OrderTrackingPage({ token: tokenProp, shopHref }: Props_4): JSX.Element;
|
|
934
985
|
|
|
935
986
|
export declare type OrderTrackingStep = {
|
|
@@ -1246,6 +1297,12 @@ declare type Props = {
|
|
|
1246
1297
|
* droite). Meme paquet, meme rendu partout — sauf choix explicite.
|
|
1247
1298
|
*/
|
|
1248
1299
|
supportButtonVariant?: SupportButtonVariant;
|
|
1300
|
+
/**
|
|
1301
|
+
* Pages ou le bouton d'aide est VISIBLE (prefixes d'adresse, ex.
|
|
1302
|
+
* `["/compte", "/panier"]`). Absent = partout (defaut inchange).
|
|
1303
|
+
* Ailleurs, `openSupport()` ouvre quand meme le formulaire.
|
|
1304
|
+
*/
|
|
1305
|
+
supportButtonPaths?: string[];
|
|
1249
1306
|
onPackageUpdated?: (event: PackageUpdateEvent) => void;
|
|
1250
1307
|
triggerOnFirstInstallPackageCallback?: boolean;
|
|
1251
1308
|
packageVersionStorageKey?: string;
|
|
@@ -1728,8 +1785,16 @@ export declare type SubscriptionSubscriber = {
|
|
|
1728
1785
|
isGifted: boolean;
|
|
1729
1786
|
};
|
|
1730
1787
|
|
|
1731
|
-
export declare function
|
|
1788
|
+
export declare function summarizeOrderPoints(rows: LedgerRow[], now?: number): Map<string, OrderPoints>;
|
|
1789
|
+
|
|
1790
|
+
export declare function SupportButton({ variant, showOnPaths, }?: {
|
|
1732
1791
|
variant?: SupportButtonVariant;
|
|
1792
|
+
/**
|
|
1793
|
+
* Pages ou le declencheur est VISIBLE (prefixes d'adresse : `/compte`
|
|
1794
|
+
* couvre `/compte/...`). Absent = partout (defaut inchange). Ailleurs, le
|
|
1795
|
+
* formulaire reste joignable par `openSupport()`.
|
|
1796
|
+
*/
|
|
1797
|
+
showOnPaths?: string[];
|
|
1733
1798
|
}): JSX.Element | null;
|
|
1734
1799
|
|
|
1735
1800
|
/**
|
|
@@ -1910,6 +1975,14 @@ export declare const useInvitedToOrders: (email: string, organization?: string)
|
|
|
1910
1975
|
|
|
1911
1976
|
export declare function useLoyaltyLedger(enabled?: boolean): UseQueryResult<LedgerRow[], unknown>;
|
|
1912
1977
|
|
|
1978
|
+
/** Points par commande (billUID → résumé), pour tout l'historique du client. */
|
|
1979
|
+
export declare function useLoyaltyPointsByOrder(enabled?: boolean): {
|
|
1980
|
+
enabled: boolean;
|
|
1981
|
+
label: string;
|
|
1982
|
+
byOrder: Map<string, OrderPoints>;
|
|
1983
|
+
loading: boolean;
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1913
1986
|
export declare function useLoyaltyRewards(enabled?: boolean): UseQueryResult<LoyaltyRewards, unknown>;
|
|
1914
1987
|
|
|
1915
1988
|
export declare const useLystechPolitiqueAndConditions: () => UseQueryResult<PolitiqueAndConditionsType[], unknown>;
|