@lystech/core 3.0.137 → 3.0.138
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/bin/check-routes.cjs +6 -0
- package/dist/index.d.ts +78 -29
- package/dist/lystech-core-provider.es.js +14968 -14604
- package/dist/lystech-core-provider.umd.js +186 -186
- package/dist/lystech-core-styles.css +1 -1
- package/package.json +1 -1
package/bin/check-routes.cjs
CHANGED
|
@@ -55,6 +55,12 @@ const ATTENDU = [
|
|
|
55
55
|
],
|
|
56
56
|
pourquoi: "un client qui a oublié son mot de passe demande un lien",
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
nom: "Suivi de commande",
|
|
60
|
+
motifs: [/suivi\/:token/, /lystechAuthRoutes/, /OrderTrackingPage/],
|
|
61
|
+
pourquoi:
|
|
62
|
+
"un client clique « Suivre ma commande » dans le courriel d'expédition",
|
|
63
|
+
},
|
|
58
64
|
];
|
|
59
65
|
|
|
60
66
|
const REPLI = {
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare type AppliedPromoCodeType = {
|
|
|
30
30
|
error: string;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export declare function AskPermissionsFloatingButtons({ enableInstallAppButton, enablePushNotificationButton }:
|
|
33
|
+
export declare function AskPermissionsFloatingButtons({ enableInstallAppButton, enablePushNotificationButton }: Props_11): JSX.Element;
|
|
34
34
|
|
|
35
35
|
export declare function AuthActivationPage(): JSX.Element;
|
|
36
36
|
|
|
@@ -261,7 +261,7 @@ export declare function ClosingCountdown({ closing, onElapsed }: {
|
|
|
261
261
|
onElapsed?: () => void;
|
|
262
262
|
}): JSX.Element | null;
|
|
263
263
|
|
|
264
|
-
export declare function CollectionInvitationSelector({ onCollectionSelected, currentCollectionUID, collectionsSelectorTitle, showOptions, allowAutoSelect }:
|
|
264
|
+
export declare function CollectionInvitationSelector({ onCollectionSelected, currentCollectionUID, collectionsSelectorTitle, showOptions, allowAutoSelect }: Props_6): JSX.Element | null;
|
|
265
265
|
|
|
266
266
|
export declare type CollectionInvitationType = {
|
|
267
267
|
collectionName: string;
|
|
@@ -323,7 +323,7 @@ declare interface ContextMenuState {
|
|
|
323
323
|
title?: string;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
export declare function Countdown({ countdown, useLabels, lang, showControls, loading, showYears, onClick, onDelete, onTriggerUpdate, onToggleFeatured, }:
|
|
326
|
+
export declare function Countdown({ countdown, useLabels, lang, showControls, loading, showYears, onClick, onDelete, onTriggerUpdate, onToggleFeatured, }: Props_12): JSX.Element;
|
|
327
327
|
|
|
328
328
|
export declare type CountdownType = {
|
|
329
329
|
id?: number;
|
|
@@ -357,7 +357,7 @@ export declare function createStripeCheckout(input: StripeCheckoutInput): Promis
|
|
|
357
357
|
url: string;
|
|
358
358
|
}>;
|
|
359
359
|
|
|
360
|
-
export declare function CurrentlyInvitedToOrdersSection({ onCollectionInvitationClick }:
|
|
360
|
+
export declare function CurrentlyInvitedToOrdersSection({ onCollectionInvitationClick }: Props_5): JSX.Element;
|
|
361
361
|
|
|
362
362
|
export declare type CustomerBill = {
|
|
363
363
|
billUID: string;
|
|
@@ -473,6 +473,8 @@ declare interface DataGridRow {
|
|
|
473
473
|
|
|
474
474
|
export declare function fetchAvailableCollections(): Promise<any>;
|
|
475
475
|
|
|
476
|
+
export declare function fetchOrderTracking(token: string): Promise<PublicOrderTracking | null>;
|
|
477
|
+
|
|
476
478
|
/** « 2 j 03 h 15 min 09 s » ; les unités nulles de tête disparaissent. */
|
|
477
479
|
export declare function formatCountdown(ms: number): string;
|
|
478
480
|
|
|
@@ -525,7 +527,7 @@ export declare type ImageType = {
|
|
|
525
527
|
src: string;
|
|
526
528
|
};
|
|
527
529
|
|
|
528
|
-
export declare function InstallPwaButton({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }:
|
|
530
|
+
export declare function InstallPwaButton({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_9): JSX.Element | null;
|
|
529
531
|
|
|
530
532
|
declare type Line = {
|
|
531
533
|
UID: string;
|
|
@@ -543,7 +545,7 @@ declare type Line = {
|
|
|
543
545
|
export declare function LoadingCircle(): JSX.Element;
|
|
544
546
|
|
|
545
547
|
/** Les adresses que le serveur peut écrire dans un courriel. */
|
|
546
|
-
export declare const LYSTECH_AUTH_ROUTE_PATHS: readonly ["/account/activation/:token", "/account/reset-password/:token"];
|
|
548
|
+
export declare const LYSTECH_AUTH_ROUTE_PATHS: readonly ["/account/activation/:token", "/account/reset-password/:token", "/suivi/:token"];
|
|
547
549
|
|
|
548
550
|
export declare const LYSTECH_CORE_VERSION: any;
|
|
549
551
|
|
|
@@ -631,6 +633,16 @@ declare type OrderBreakdown = {
|
|
|
631
633
|
}[];
|
|
632
634
|
};
|
|
633
635
|
|
|
636
|
+
export declare function OrderTrackingPage({ token: tokenProp, shopHref }: Props_4): JSX.Element;
|
|
637
|
+
|
|
638
|
+
export declare type OrderTrackingStep = {
|
|
639
|
+
key: string;
|
|
640
|
+
label: string;
|
|
641
|
+
done: boolean;
|
|
642
|
+
current: boolean;
|
|
643
|
+
date: string | null;
|
|
644
|
+
};
|
|
645
|
+
|
|
634
646
|
declare type OrganizationContext = {
|
|
635
647
|
organization: string;
|
|
636
648
|
organizationImage: string;
|
|
@@ -726,7 +738,7 @@ export declare type PackageUpdateEvent = {
|
|
|
726
738
|
|
|
727
739
|
export declare function PastOrdersPage({ billUID, onCollectionInvitationClick }: Props_3): JSX.Element;
|
|
728
740
|
|
|
729
|
-
export declare function PaypalCheckout({ products, promoCodes, shippingOptionId, onOrderCreated, onOrderComplete, onShipppingOptionsChange: onShippingOptionsChangeEvent, onInstrumentDeclined, onError, }:
|
|
741
|
+
export declare function PaypalCheckout({ products, promoCodes, shippingOptionId, onOrderCreated, onOrderComplete, onShipppingOptionsChange: onShippingOptionsChangeEvent, onInstrumentDeclined, onError, }: Props_7): JSX.Element;
|
|
730
742
|
|
|
731
743
|
export declare type PaypalInfoType = {
|
|
732
744
|
clientId: string;
|
|
@@ -810,7 +822,7 @@ declare type ProductProp = {
|
|
|
810
822
|
fk_organization: string;
|
|
811
823
|
};
|
|
812
824
|
|
|
813
|
-
export declare function Progress({ percentage, color, showPercentage, text, }:
|
|
825
|
+
export declare function Progress({ percentage, color, showPercentage, text, }: Props_13): JSX.Element;
|
|
814
826
|
|
|
815
827
|
declare type ProgressiveWebAppContextType = {
|
|
816
828
|
useProgressiveWebAppFeatures?: boolean | 'mobile';
|
|
@@ -827,7 +839,7 @@ declare type ProgressiveWebAppContextType = {
|
|
|
827
839
|
installProgressiveWebApp: () => Promise<void>;
|
|
828
840
|
};
|
|
829
841
|
|
|
830
|
-
export declare function PromoCodeTag({ promoCode, showExpireInfo, onClick, isApplied, onRemove, }:
|
|
842
|
+
export declare function PromoCodeTag({ promoCode, showExpireInfo, onClick, isApplied, onRemove, }: Props_14): JSX.Element;
|
|
831
843
|
|
|
832
844
|
export declare type PromoCodeType = {
|
|
833
845
|
id: number;
|
|
@@ -874,13 +886,24 @@ declare type Props = {
|
|
|
874
886
|
};
|
|
875
887
|
|
|
876
888
|
declare type Props_10 = {
|
|
889
|
+
forceVisible?: boolean;
|
|
890
|
+
size?: number;
|
|
891
|
+
visible?: boolean;
|
|
892
|
+
text?: string;
|
|
893
|
+
knowMoreUrl?: string;
|
|
894
|
+
knowMoreText?: string;
|
|
895
|
+
onAction?: () => void;
|
|
896
|
+
onPopupClose?: () => void;
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
declare type Props_11 = {
|
|
877
900
|
enableInstallAppButton?: boolean;
|
|
878
901
|
enablePushNotificationButton?: boolean;
|
|
879
902
|
knowMoreUrl?: string;
|
|
880
903
|
knowMoreText?: string;
|
|
881
904
|
};
|
|
882
905
|
|
|
883
|
-
declare type
|
|
906
|
+
declare type Props_12 = {
|
|
884
907
|
countdown: CountdownType_2;
|
|
885
908
|
useLabels?: boolean;
|
|
886
909
|
lang?: "fr" | "en";
|
|
@@ -893,14 +916,14 @@ declare type Props_11 = {
|
|
|
893
916
|
onToggleFeatured?: () => void;
|
|
894
917
|
};
|
|
895
918
|
|
|
896
|
-
declare type
|
|
919
|
+
declare type Props_13 = {
|
|
897
920
|
percentage?: number;
|
|
898
921
|
color?: string;
|
|
899
922
|
showPercentage?: boolean;
|
|
900
923
|
text?: string;
|
|
901
924
|
};
|
|
902
925
|
|
|
903
|
-
declare type
|
|
926
|
+
declare type Props_14 = {
|
|
904
927
|
promoCode: PromoCodeType;
|
|
905
928
|
showExpireInfo?: boolean;
|
|
906
929
|
onClick?: () => void;
|
|
@@ -931,10 +954,17 @@ declare type Props_3 = {
|
|
|
931
954
|
};
|
|
932
955
|
|
|
933
956
|
declare type Props_4 = {
|
|
934
|
-
|
|
957
|
+
/** Jeton à lire ; par défaut le paramètre `:token` de la route. */
|
|
958
|
+
token?: string;
|
|
959
|
+
/** Lien « retour à la boutique » ; par défaut l'adresse renvoyée par le serveur, sinon « / ». */
|
|
960
|
+
shopHref?: string;
|
|
935
961
|
};
|
|
936
962
|
|
|
937
963
|
declare type Props_5 = {
|
|
964
|
+
onCollectionInvitationClick?: (invitation: CollectionInvitationType) => void;
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
declare type Props_6 = {
|
|
938
968
|
/** `auto` : choisie par la page (une seule commande ouverte), pas par un clic — à remplacer dans l'historique du navigateur, pas à empiler. */
|
|
939
969
|
onCollectionSelected?: (collectionUID: string, info?: {
|
|
940
970
|
auto: boolean;
|
|
@@ -946,7 +976,7 @@ declare type Props_5 = {
|
|
|
946
976
|
allowAutoSelect?: boolean;
|
|
947
977
|
};
|
|
948
978
|
|
|
949
|
-
declare type
|
|
979
|
+
declare type Props_7 = {
|
|
950
980
|
products?: {
|
|
951
981
|
UID: string;
|
|
952
982
|
quantity: number;
|
|
@@ -970,7 +1000,7 @@ declare type Props_6 = {
|
|
|
970
1000
|
onError?: (error: string) => void;
|
|
971
1001
|
};
|
|
972
1002
|
|
|
973
|
-
declare type
|
|
1003
|
+
declare type Props_8 = {
|
|
974
1004
|
/** Panier de produits Lystech (UID) — alternative à priceId. */
|
|
975
1005
|
products?: {
|
|
976
1006
|
UID: string;
|
|
@@ -992,7 +1022,7 @@ declare type Props_7 = {
|
|
|
992
1022
|
onRedirect?: (url: string) => void;
|
|
993
1023
|
};
|
|
994
1024
|
|
|
995
|
-
declare interface
|
|
1025
|
+
declare interface Props_9 {
|
|
996
1026
|
forceVisible?: boolean;
|
|
997
1027
|
size?: number;
|
|
998
1028
|
visible?: boolean;
|
|
@@ -1003,17 +1033,6 @@ declare interface Props_8 {
|
|
|
1003
1033
|
onPopupClose?: () => void;
|
|
1004
1034
|
}
|
|
1005
1035
|
|
|
1006
|
-
declare type Props_9 = {
|
|
1007
|
-
forceVisible?: boolean;
|
|
1008
|
-
size?: number;
|
|
1009
|
-
visible?: boolean;
|
|
1010
|
-
text?: string;
|
|
1011
|
-
knowMoreUrl?: string;
|
|
1012
|
-
knowMoreText?: string;
|
|
1013
|
-
onAction?: () => void;
|
|
1014
|
-
onPopupClose?: () => void;
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
1036
|
declare type ProviderType = {
|
|
1018
1037
|
popupElement: default_2.ReactNode;
|
|
1019
1038
|
confirmPopupElement: default_2.ReactNode;
|
|
@@ -1031,6 +1050,36 @@ declare type ProviderType_2 = {
|
|
|
1031
1050
|
children: default_2.ReactNode;
|
|
1032
1051
|
};
|
|
1033
1052
|
|
|
1053
|
+
export declare type PublicOrderTracking = {
|
|
1054
|
+
shop: {
|
|
1055
|
+
name: string;
|
|
1056
|
+
url: string;
|
|
1057
|
+
primaryColor: string | null;
|
|
1058
|
+
};
|
|
1059
|
+
orderNumber: string;
|
|
1060
|
+
orderedOn: string | null;
|
|
1061
|
+
status: string;
|
|
1062
|
+
statusLabel: string;
|
|
1063
|
+
mode: "delivery" | "pickup" | null;
|
|
1064
|
+
steps: OrderTrackingStep[];
|
|
1065
|
+
carrier: {
|
|
1066
|
+
name: string;
|
|
1067
|
+
trackingNumber: string | null;
|
|
1068
|
+
url: string | null;
|
|
1069
|
+
} | null;
|
|
1070
|
+
pickupLocation: string | null;
|
|
1071
|
+
customerNote: string | null;
|
|
1072
|
+
items: Array<{
|
|
1073
|
+
name: string;
|
|
1074
|
+
format: string | null;
|
|
1075
|
+
quantity: number;
|
|
1076
|
+
unitPrice: number;
|
|
1077
|
+
}>;
|
|
1078
|
+
total: number;
|
|
1079
|
+
currency: string;
|
|
1080
|
+
updatedOn: string | null;
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1034
1083
|
declare type PushNotificationContextType = {
|
|
1035
1084
|
usePushNotifications?: boolean;
|
|
1036
1085
|
isPushSupported: boolean;
|
|
@@ -1183,7 +1232,7 @@ declare interface SquareImageProps {
|
|
|
1183
1232
|
* crée la session côté backend (POST /stripe/checkout) puis redirige vers la
|
|
1184
1233
|
* page de paiement Stripe. Aucun formulaire de carte côté client.
|
|
1185
1234
|
*/
|
|
1186
|
-
export declare function StripeCheckout({ products, priceId, quantity, successUrl, cancelUrl, customerEmail, promoCodes, shippingOptionId, label, block, disabled, onError, onRedirect, }:
|
|
1235
|
+
export declare function StripeCheckout({ products, priceId, quantity, successUrl, cancelUrl, customerEmail, promoCodes, shippingOptionId, label, block, disabled, onError, onRedirect, }: Props_8): JSX.Element;
|
|
1187
1236
|
|
|
1188
1237
|
export declare interface StripeCheckoutInput {
|
|
1189
1238
|
/** Un seul prix Stripe (ex. depuis le catalogue). */
|
|
@@ -1203,7 +1252,7 @@ export declare interface StripeCheckoutInput {
|
|
|
1203
1252
|
shippingOptionId?: number | string | null;
|
|
1204
1253
|
}
|
|
1205
1254
|
|
|
1206
|
-
export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }:
|
|
1255
|
+
export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_10): JSX.Element;
|
|
1207
1256
|
|
|
1208
1257
|
export declare type Subscription = {
|
|
1209
1258
|
UID?: string;
|