2024-10-09
This commit is contained in:
parent
a129d830cb
commit
336911df78
333 changed files with 5413 additions and 2967 deletions
|
|
@ -87,7 +87,7 @@
|
|||
}
|
||||
:root {
|
||||
/* Couleurs */
|
||||
--couleur-blanc: #fff;
|
||||
--couleur-blanc: #ffffff;
|
||||
--couleur-gris: #eceaeb;
|
||||
--couleur-bordeaux: #490918;
|
||||
--couleur-jaune: #ebffb8;
|
||||
|
|
@ -95,6 +95,14 @@
|
|||
/* Polices */
|
||||
--police-lato: "Lato", sans-serif;
|
||||
--police-myriad: "Myriad", sans-serif;
|
||||
/* Hauteurs de ligne */
|
||||
--hauteur-ligne-classique: 1.5;
|
||||
--hauteur-ligne-rapprochee: 1;
|
||||
/* Espacements entre les lettres */
|
||||
--espacement-inter-lettres-etendu-s: 0.5px;
|
||||
--espacement-inter-lettres-etendu-m: 1px;
|
||||
--espacement-inter-lettres-etendu-l: 1.5px;
|
||||
--espacement-inter-lettres-etendu-xl: 2px;
|
||||
/* Dimensions */
|
||||
--en-tete-hauteur: 60px;
|
||||
--menu-categories-produits-hauteur: 54.39px;
|
||||
|
|
@ -106,23 +114,21 @@
|
|||
--espace-xl: 2rem;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Utilise un meilleur modèle de boîte.
|
||||
*/
|
||||
html {
|
||||
box-sizing: border-box; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Réinitialise avec des styles par défaut plus simples.
|
||||
*
|
||||
* 1. Hérite du modèle de boîte du document par défaut.
|
||||
* 2. Pas de marges par défaut.
|
||||
* 3. Hérite par défaut des styles de texte et de couleur.
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
*, *::before, *::after {
|
||||
box-sizing: inherit; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
padding: 0; /* 2 */
|
||||
|
|
@ -130,7 +136,7 @@ html {
|
|||
color: inherit; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Utilise une couleur d'arrière-plan définie.
|
||||
* 2. Utilise la couleur primaire du site.
|
||||
*/
|
||||
|
|
@ -139,24 +145,26 @@ body {
|
|||
background: var(--couleur-gris); /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Force l'héritage des styles pour ces éléments.
|
||||
*/
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
button, input, select, textarea {
|
||||
font: inherit; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Change la couleur d'arrière-plan à la sélection du texte.
|
||||
*/
|
||||
*::selection {
|
||||
background: var(--couleur-jaune);
|
||||
}
|
||||
|
||||
/**
|
||||
/* Désaffiche tout élément avec l'attribut hidden */
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* *
|
||||
* Désactive les animations pour les Utilisateurs n'en souhaitant pas.
|
||||
*/
|
||||
@media (prefers-reduced-motion) {
|
||||
|
|
@ -166,7 +174,7 @@ textarea {
|
|||
animation-duration: 0s !important;
|
||||
}
|
||||
}
|
||||
/**
|
||||
/* *
|
||||
* 2. Rendu spécifique du texte pour Safari/iOS.
|
||||
* 3. Rendu plus précis du texte.
|
||||
*/
|
||||
|
|
@ -177,26 +185,32 @@ html {
|
|||
}
|
||||
|
||||
body {
|
||||
font: 1rem/1.4 Lato;
|
||||
font: 1rem/var(--hauteur-ligne-classique) Lato;
|
||||
font-optical-sizing: auto;
|
||||
font-kerning: normal;
|
||||
font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures contextual;
|
||||
color: var(--couleur-noir);
|
||||
text-decoration-skip-ink: auto;
|
||||
letter-spacing: 0.5px;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
/* Mixins Sass */
|
||||
/* *
|
||||
* Réinitialisation des styles des <button>.
|
||||
*/
|
||||
button {
|
||||
all: initial;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
button.bouton-case-pleine {
|
||||
width: 100%;
|
||||
|
|
@ -217,9 +231,14 @@ input:focus, input:focus-visible, select:focus, select:focus-visible, textarea:f
|
|||
background: var(--couleur-jaune);
|
||||
outline: 1px solid var(--couleur-noir);
|
||||
}
|
||||
input:disabled, select:disabled, textarea:disabled {
|
||||
cursor: not-allowed;
|
||||
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px 0.5px/2px 2px;
|
||||
}
|
||||
|
||||
input:is([type=email], [type=text], [type=tel])::placeholder, textarea::placeholder {
|
||||
text-transform: lowercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
input:is([type=email], [type=text], [type=tel])::selection, textarea::selection {
|
||||
color: var(--couleur-blanc);
|
||||
|
|
@ -243,7 +262,7 @@ input[type=checkbox], input[type=radio] {
|
|||
appearance: none;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
transition: 0.2s background;
|
||||
/**
|
||||
/* *
|
||||
* 1. Pour un alignement parfait du label avec la case à cocher.
|
||||
*/
|
||||
}
|
||||
|
|
@ -261,13 +280,12 @@ label:has(~ input[type=checkbox], ~ input[type=radio]), input[type=checkbox] + l
|
|||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Facilite l'usages des images.
|
||||
* 2. Affiche les images dans l'intégralité de leur conteneur, en contrepartie d'un recoupage.
|
||||
* 3. Arrière-plan jaune en attendant le chargement de l'image.
|
||||
*/
|
||||
img,
|
||||
picture {
|
||||
img, picture {
|
||||
display: block; /* 1 */
|
||||
max-width: 100%; /* 2 */
|
||||
}
|
||||
|
|
@ -277,7 +295,7 @@ img {
|
|||
background: var(--couleur-jaune); /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Change la « bordure » de base.
|
||||
* 2. Ajoute un contour, qui sera colorisé au focus.
|
||||
* 3. Anime le changement de couleur des texte, bordure et contour.
|
||||
|
|
@ -293,7 +311,7 @@ a {
|
|||
transition: 0.2s color, 0.2s font-weight, 0.2s background, 0.2s outline-color, 0.2s border-color, 0.2s text-decoration-color; /* 3 */
|
||||
text-decoration-skip: edges; /* 1 */
|
||||
/* Change les couleurs de l'arrière-plan et du contour pour marquer le focus. */
|
||||
/**
|
||||
/* *
|
||||
* Lien ressemblant visuellement à un bouton.
|
||||
*/
|
||||
}
|
||||
|
|
@ -329,14 +347,14 @@ a.lien-bouton:active {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Réinitialise les styles des listes non ordonnées.
|
||||
*
|
||||
* 1. Pas de puce.
|
||||
*/
|
||||
ul {
|
||||
list-style: none; /* 1 */
|
||||
/**
|
||||
/* *
|
||||
* Utilise un SVG comme puce de liste via l'emploi d'un arrière-plan.
|
||||
*
|
||||
* 1. Ajoute de la marge interne pour que la puce ait de la place.
|
||||
|
|
@ -381,8 +399,7 @@ ul.avec-puce-cercle a {
|
|||
#en-tete .logo {
|
||||
width: var(--en-tete-logo-longueur);
|
||||
}
|
||||
#en-tete .logo picture,
|
||||
#en-tete .logo img {
|
||||
#en-tete .logo picture, #en-tete .logo img {
|
||||
background: transparent;
|
||||
}
|
||||
#en-tete .menu-navigation {
|
||||
|
|
@ -391,7 +408,7 @@ ul.avec-puce-cercle a {
|
|||
flex: 1;
|
||||
text-align: center;
|
||||
text-transform: lowercase;
|
||||
/**
|
||||
/* *
|
||||
* Le conteneur d'une entrée du menu, nécessaire pour que le changement d'arrière-plan au
|
||||
* survol soit possible.
|
||||
*
|
||||
|
|
@ -435,7 +452,7 @@ ul.avec-puce-cercle a {
|
|||
gap: 1rem;
|
||||
place-items: center;
|
||||
text-align: center;
|
||||
/**
|
||||
/* *
|
||||
* 1. Permet d'éviter un agrandissement de l'élément avec plus de 9 articles.
|
||||
*/
|
||||
}
|
||||
|
|
@ -450,7 +467,7 @@ ul.avec-puce-cercle a {
|
|||
background: var(--couleur-jaune);
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Le menu avec les Catégories de Produits pour une navigation rapide.
|
||||
*
|
||||
* 1. Applique une marge supérieure égale à la hauteur de l'en-tête pour qu'elle puisse s'afficher
|
||||
|
|
@ -465,7 +482,7 @@ ul.avec-puce-cercle a {
|
|||
--menu-entree-marges-internes-ligne: var(--espace-m);
|
||||
height: var(--menu-section-hauteur);
|
||||
margin-top: var(--menu-section-marges-bloc-debut); /* 1 */
|
||||
/**
|
||||
/* *
|
||||
* Liste des Catégories de Produits.
|
||||
*
|
||||
* 1. Toutes les entrées font la même longueur, en respectant une contrainte de longueur
|
||||
|
|
@ -477,7 +494,7 @@ ul.avec-puce-cercle a {
|
|||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--menu-entree-longueur-minimale), 1fr)); /* 1 */
|
||||
place-items: center;
|
||||
/**
|
||||
/* *
|
||||
* 1. Force chaque entrée à occuper tout l'espace alloué par grid.
|
||||
*/
|
||||
}
|
||||
|
|
@ -490,7 +507,7 @@ ul.avec-puce-cercle a {
|
|||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
background: var(--couleur-noir);
|
||||
/**
|
||||
/* *
|
||||
* 1. Permet de créer des marges verticales.
|
||||
* 2. Hérite de la longueur du conteneur.
|
||||
* 3. Surchargement de styles pour les liens.
|
||||
|
|
@ -527,7 +544,7 @@ ul.avec-puce-cercle a {
|
|||
border-right: initial;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Les photos du Produit, étalées sur 2 colonnes : une pour la photo Produit, une pour les photos
|
||||
* portées.
|
||||
*
|
||||
|
|
@ -567,7 +584,7 @@ ul.avec-puce-cercle a {
|
|||
max-height: var(--colonne-droite-photo-hauteur-minimale);
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* La Grille des Produits sous forme de Cartes.
|
||||
*
|
||||
* Les Cartes ont une taille minimale et occupent l'espace en ligne disponible jusqu'à l'occuper
|
||||
|
|
@ -649,7 +666,7 @@ ul.avec-puce-cercle a {
|
|||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Boîte flottante avec les informations Produit, le sélecteur de variation et de quantité pour le
|
||||
* Panier.
|
||||
*
|
||||
|
|
@ -676,7 +693,7 @@ ul.avec-puce-cercle a {
|
|||
width: var(--boite-longueur);
|
||||
max-width: var(--boite-longueur);
|
||||
border: 1px solid var(--couleur-noir);
|
||||
/**
|
||||
/* *
|
||||
* Définis les apparence et comportement de toutes les sections de la boîte.
|
||||
*/
|
||||
}
|
||||
|
|
@ -702,9 +719,6 @@ ul.avec-puce-cercle a {
|
|||
padding: var(--section-marges-internes);
|
||||
font-weight: 350;
|
||||
}
|
||||
.informations-produit .onglets-details-produit > section[hidden] {
|
||||
display: none;
|
||||
}
|
||||
.informations-produit .onglets-details-produit > section ul {
|
||||
list-style: disc;
|
||||
list-style-position: inside;
|
||||
|
|
@ -754,12 +768,12 @@ ul.avec-puce-cercle a {
|
|||
.informations-produit .selecteur-produit {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
column-gap: 2rem;
|
||||
column-gap: var(--espace-xl);
|
||||
place-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
line-height: 1;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
}
|
||||
.informations-produit .selecteur-produit__nom {
|
||||
letter-spacing: 1px;
|
||||
|
|
@ -812,7 +826,7 @@ ul.avec-puce-cercle a {
|
|||
.informations-produit .selecteur-produit__selection-variation select {
|
||||
position: relative;
|
||||
min-width: 4rem;
|
||||
padding: 0.5rem 2rem;
|
||||
padding: 0.5rem var(--espace-xl);
|
||||
text-align: center;
|
||||
appearance: none;
|
||||
background: rgba(236, 234, 235, 0.9);
|
||||
|
|
@ -862,9 +876,9 @@ ul.avec-puce-cercle a {
|
|||
}
|
||||
.produits-similaires {
|
||||
display: grid;
|
||||
grid-template-areas: "en-tete en-tete en-tete" "produits produits produits";
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: 1fr auto;
|
||||
grid-template-areas: "en-tete en-tete en-tete" "produits produits produits";
|
||||
place-items: center;
|
||||
margin-top: var(--espace-m);
|
||||
/* En-tête de la section */
|
||||
|
|
@ -878,14 +892,14 @@ ul.avec-puce-cercle a {
|
|||
}
|
||||
.produits-similaires header h2 {
|
||||
font-style: italic;
|
||||
line-height: 1;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.produits-similaires .grille-produits-similaires {
|
||||
display: grid;
|
||||
grid-auto-rows: 1fr;
|
||||
grid-area: produits;
|
||||
grid-auto-rows: 1fr;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 1px;
|
||||
width: 100%;
|
||||
|
|
@ -944,7 +958,7 @@ ul.avec-puce-cercle a {
|
|||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Le pied de page du site.
|
||||
*/
|
||||
#pied-de-page {
|
||||
|
|
@ -956,7 +970,7 @@ ul.avec-puce-cercle a {
|
|||
place-items: center;
|
||||
max-width: 100vw;
|
||||
padding: var(--pied-de-page-marges-internes-bloc) var(--pied-de-page-marges-internes-ligne);
|
||||
line-height: 1.5;
|
||||
line-height: var(--hauteur-ligne-classique);
|
||||
background: var(--couleur-jaune);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -104,6 +104,12 @@
|
|||
--couleur-noir: #202020;
|
||||
--police-lato: "Lato", sans-serif;
|
||||
--police-myriad: "Myriad", sans-serif;
|
||||
--hauteur-ligne-classique: 1.5;
|
||||
--hauteur-ligne-rapprochee: 1;
|
||||
--espacement-inter-lettres-etendu-s: .5px;
|
||||
--espacement-inter-lettres-etendu-m: 1px;
|
||||
--espacement-inter-lettres-etendu-l: 1.5px;
|
||||
--espacement-inter-lettres-etendu-xl: 2px;
|
||||
--en-tete-hauteur: 60px;
|
||||
--menu-categories-produits-hauteur: 54.39px;
|
||||
--espace-xs: .25rem;
|
||||
|
|
@ -138,6 +144,10 @@ button, input, select, textarea {
|
|||
background: var(--couleur-jaune);
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
*, :before, :after {
|
||||
scroll-behavior: auto !important;
|
||||
|
|
@ -153,13 +163,17 @@ html {
|
|||
}
|
||||
|
||||
body {
|
||||
font: 1rem / var(--hauteur-ligne-classique) Lato;
|
||||
font-optical-sizing: auto;
|
||||
font-kerning: normal;
|
||||
font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures contextual;
|
||||
color: var(--couleur-noir);
|
||||
text-decoration-skip-ink: auto;
|
||||
letter-spacing: .5px;
|
||||
font: 1rem / 1.4 Lato;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
em {
|
||||
|
|
@ -170,6 +184,7 @@ button {
|
|||
all: initial;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
button.bouton-case-pleine {
|
||||
|
|
@ -194,8 +209,14 @@ input:focus, input:focus-visible, select:focus, select:focus-visible, textarea:f
|
|||
outline: 1px solid var(--couleur-noir);
|
||||
}
|
||||
|
||||
input:disabled, select:disabled, textarea:disabled {
|
||||
cursor: not-allowed;
|
||||
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px .5px / 2px 2px;
|
||||
}
|
||||
|
||||
input:is([type="email"], [type="text"], [type="tel"])::placeholder, textarea::placeholder {
|
||||
text-transform: lowercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
|
||||
input:is([type="email"], [type="text"], [type="tel"])::selection, textarea::selection {
|
||||
|
|
@ -616,10 +637,6 @@ ul.avec-puce-cercle a {
|
|||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.informations-produit .onglets-details-produit > section[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.informations-produit .onglets-details-produit > section ul {
|
||||
list-style: inside;
|
||||
}
|
||||
|
|
@ -669,13 +686,13 @@ ul.avec-puce-cercle a {
|
|||
}
|
||||
|
||||
.informations-produit .selecteur-produit {
|
||||
column-gap: var(--espace-xl);
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
flex-flow: row;
|
||||
justify-content: space-between;
|
||||
place-items: center;
|
||||
column-gap: 2rem;
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
|
@ -730,12 +747,12 @@ ul.avec-puce-cercle a {
|
|||
}
|
||||
|
||||
.informations-produit .selecteur-produit__selection-variation select {
|
||||
padding: .5rem var(--espace-xl);
|
||||
text-align: center;
|
||||
appearance: none;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
background: #eceaebe6;
|
||||
min-width: 4rem;
|
||||
padding: .5rem 2rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
|
@ -804,10 +821,10 @@ ul.avec-puce-cercle a {
|
|||
}
|
||||
|
||||
.produits-similaires header h2 {
|
||||
font-style: italic;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
font-style: italic;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.produits-similaires .grille-produits-similaires {
|
||||
|
|
@ -886,12 +903,12 @@ ul.avec-puce-cercle a {
|
|||
--pied-de-page-marges-internes-bloc: var(--espace-m);
|
||||
--pied-de-page-marges-internes-ligne: var(--espace-xl);
|
||||
padding: var(--pied-de-page-marges-internes-bloc) var(--pied-de-page-marges-internes-ligne);
|
||||
line-height: var(--hauteur-ligne-classique);
|
||||
background: var(--couleur-jaune);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
grid-template-columns: 1fr 1fr;
|
||||
place-items: center;
|
||||
max-width: 100vw;
|
||||
line-height: 1.5;
|
||||
display: grid;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -57,7 +57,7 @@
|
|||
font-style: initial;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
/* Bouton d'addition de quantité */
|
||||
/**
|
||||
/* *
|
||||
* 1. Cache les flèches d'augmentation/diminution sur Firefox.
|
||||
* 2. Cache les flèches d'augmentation/diminution sur Chrome/Edge/Safari.
|
||||
*/
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
padding: var(--espace-l) var(--espace-xl);
|
||||
text-align: center;
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
/**
|
||||
/* *
|
||||
* 1. Nécessaire pour ne pas qu'un espace vertical non souhaité apparaisse.
|
||||
* 2. Applique une marge entre les instructions et le code promo de notre choix.
|
||||
*/
|
||||
|
|
@ -190,7 +190,6 @@
|
|||
font-style: italic;
|
||||
}
|
||||
#panneau-panier .panneau__sous-totaux__ligne strong {
|
||||
font-weight: 600;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
#panneau-panier .panneau__sous-totaux__ligne.sous-total strong {
|
||||
|
|
@ -200,6 +199,7 @@
|
|||
font-size: 0.8rem;
|
||||
font-weight: 450;
|
||||
color: grey;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
#panneau-panier .panneau__pied-de-page {
|
||||
align-content: center;
|
||||
|
|
@ -268,13 +268,19 @@
|
|||
#panneau-informations-client .panneau__formulaires .panneau__formulaires__separation-adresses label {
|
||||
text-transform: lowercase;
|
||||
}
|
||||
#panneau-informations-client .panneau__formulaires .panneau__formulaires__paiement .formulaire__paiement__attente-renseignement-formulaires {
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
#panneau-informations-client .panneau__formulaires .panneau__formulaires__paiement .formulaire__paiement__attente-renseignement-formulaires p {
|
||||
font-style: italic;
|
||||
}
|
||||
#panneau-informations-client .formulaire {
|
||||
margin: auto;
|
||||
padding: 0 var(--espace-xl);
|
||||
}
|
||||
#panneau-informations-client .formulaire [hidden] {
|
||||
display: none;
|
||||
}
|
||||
#panneau-informations-client .formulaire + .formulaire {
|
||||
margin-top: var(--espace-xl);
|
||||
}
|
||||
|
|
@ -325,10 +331,9 @@
|
|||
font: inherit;
|
||||
color: inherit;
|
||||
text-transform: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Applique une marge supérieure égale à la hauteur de l'en-tête pour qu'elle puisse s'afficher
|
||||
* correctement.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/layouts/_panneau-panier.scss","../../../src/sass/layouts/_panneau-informations-client.scss","../../../src/sass/pages/page-panier.scss"],"names":[],"mappings":";AAEA;EACE;;AAEA;EACE;;AAIF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;AAMA;AAOA;AAAA;AAAA;AAAA;AAoBA;AAOA;;AAtCA;EACE;;AAIF;EACE;EACA;EACA;;AAOF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAKJ;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;IACE;IACA;;;AASZ;EACE;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAMN;EACE;EACA;EACA;EACA;AAEA;AAAA;AAAA;AAAA;;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;ACjQJ;EACE;EACA;;AAIF;EAEE;EACA;EACA;EAGA;EAEA;EACA;;AAEA;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAMN;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAKN;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;;ACvIN;AAAA;AAAA;AAAA;AAIA;AACE;EACA;AAEA;EACA;EAEA;EACA;EACA;EACA;;AAGE;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAON;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA","file":"page-panier.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/layouts/_panneau-panier.scss","../../../src/sass/layouts/_panneau-informations-client.scss","../../../src/sass/pages/page-panier.scss"],"names":[],"mappings":";AAEA;EACE;;AAEA;EACE;;AAIF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;AAOA;AAOA;AAAA;AAAA;AAAA;AAmBA;AAOA;;AAtCA;EACE;;AAKF;EACE;EACA;EACA;;AAOF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAKJ;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;IACE;IACA;;;AASZ;EACE;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAMN;EACE;EACA;EACA;EACA;AAEA;AAAA;AAAA;AAAA;;AAIA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;ACjQJ;EACE;EACA;;AAIF;EAEE;EACA;EACA;EAGA;EAEA;EACA;;AAEA;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAMN;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAMR;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAIA;EACE;;AAKN;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AC/IN;AAAA;AAAA;AAAA;AAIA;AACE;EACA;AAEA;EACA;EAEA;EACA;EACA;EACA;;AAGE;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAON;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA","file":"page-panier.css"}
|
||||
|
|
@ -210,7 +210,6 @@
|
|||
|
||||
#panneau-panier .panneau__sous-totaux__ligne strong {
|
||||
text-transform: lowercase;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#panneau-panier .panneau__sous-totaux__ligne.sous-total strong {
|
||||
|
|
@ -219,6 +218,7 @@
|
|||
|
||||
#panneau-panier .panneau__sous-totaux__conditions-livraison {
|
||||
color: gray;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
font-size: .8rem;
|
||||
font-weight: 450;
|
||||
}
|
||||
|
|
@ -300,15 +300,22 @@
|
|||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
#panneau-informations-client .panneau__formulaires .panneau__formulaires__paiement .formulaire__paiement__attente-renseignement-formulaires {
|
||||
text-align: center;
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#panneau-informations-client .panneau__formulaires .panneau__formulaires__paiement .formulaire__paiement__attente-renseignement-formulaires p {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#panneau-informations-client .formulaire {
|
||||
padding: 0 var(--espace-xl);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#panneau-informations-client .formulaire [hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#panneau-informations-client .formulaire + .formulaire {
|
||||
margin-top: var(--espace-xl);
|
||||
}
|
||||
|
|
@ -368,7 +375,6 @@
|
|||
font: inherit;
|
||||
color: inherit;
|
||||
text-transform: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
#page-panier {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -17,27 +17,27 @@
|
|||
],
|
||||
"integrity": "sha512-BrOGLIo6Hd2bL9MbCd5YcISzpVZjfEBeq9PVKcKIWza4ycU1qmwPIyE2D/z4wLgps5iNAtHsGUI0JE0FzkdqCw=="
|
||||
},
|
||||
"_exports.DNZBdkMD.js": {
|
||||
"file": "exports.DNZBdkMD.js",
|
||||
"_exports.D-K_zMCo.js": {
|
||||
"file": "exports.D-K_zMCo.js",
|
||||
"name": "exports",
|
||||
"integrity": "sha512-aYGtBzQ/fess8aZnfmsI/TdNNom1Dd1BfM2g/AXaeZdTjhzD2Ul5kLl1RuXv1nM1/k2HWy0eFaasBtiz5l8YHA=="
|
||||
"integrity": "sha512-Ni3hTtCfn0bMn2baSlaQd67X7zSMi5qPb8spnFBQcAh9YmAYVsM91gS6tU0VTsBDLgX+rgPCPKWpd2KX35NjNw=="
|
||||
},
|
||||
"_index.CCa5Y_L9.js": {
|
||||
"file": "index.CCa5Y_L9.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-90fLqYbmnlMjhgjkHf4kDEY5l9tWpXgXpK3UZHKW6v9OsRy/984W2biSAMatbQDVAdGBAc1qilsYHB881LHY5w=="
|
||||
},
|
||||
"_index.CeK6pfoJ.js": {
|
||||
"file": "index.CeK6pfoJ.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-cxTw0sKKut2H95JwMgiKgEVLyZ0QswK/HydKTapcqcs3w6xHIHNUpYBLdRzEYdeRfHKUsA0kvPNBXBk/QeazjQ=="
|
||||
},
|
||||
"_index.DD7qm8S6.js": {
|
||||
"file": "index.DD7qm8S6.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-dZ1dcfuB5XOKbN4ien9D6aGQ6O9ghxM4BXEuBnrAX4/oG2pkzPt+/S1hXGkkJk7HNcq+w6Eul+vn19rj+sjA1w=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts": {
|
||||
"file": "api2.js",
|
||||
"file": "api.js",
|
||||
"name": "api",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-OGDTSU0OSXJUESGtD0sMHwLOq6+wq//123su7w7e2Z+ZCcF2qAorEThC2YYPOImLINcYsEZBZNPNgIAKDeIPsQ=="
|
||||
"integrity": "sha512-isSbYHck1VApW4KWFvzCqcYoJ7U4biNCdQ3ow29jcLclrNvPSUarq5a4fuGtSU62V05477qOQygpvqRjkFQVUQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts": {
|
||||
"file": "cart2.js",
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"name": "dom",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-u5Gy5kzxh8SdanwxPC6cwZKCkYXxLVzhlTSpKHrp97xgD0JflWs4jOb833HbtRENWBAHWz23O8nU1GzUKShleg=="
|
||||
"integrity": "sha512-l9s8C0IttUY6bsApERfqCuEoZzF9AIHa/D2fMPjvBXOSdChM5oYqLsLyRadUeif51CR6OwNYivTjvw6TN1VRJA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts": {
|
||||
"file": "messages3.js",
|
||||
|
|
@ -68,20 +68,9 @@
|
|||
"imports": [
|
||||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"_exports.DNZBdkMD.js"
|
||||
"_exports.D-K_zMCo.js"
|
||||
],
|
||||
"integrity": "sha512-eVSR0QcVJwlsN8al1nIL4GG6j7ujSzhzx9xfx+ZxzfjLfQkVz4AFLWHDyJE2MMKCqQwu/NVMPRnuqFGTFSA0bw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/api.ts": {
|
||||
"file": "api.js",
|
||||
"name": "api",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/api.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"_Either.wHNxn7Os.js"
|
||||
],
|
||||
"integrity": "sha512-EUghr3HdRUL5NtkX8tfwUX8JdvV3Gb2MsC974OXT9dxSnYT9xkNKzRu8bc8jiLlLQ6UqU/9npIEvxQOf4y+qEw=="
|
||||
"integrity": "sha512-ds59FiRHCNygXUzWjGmbLzhMtYxqEv35F3htG4iYyg/67sZPvPG/Iu2itE/s0JUbnhC5XRUnTJHIe0AkchBGLA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts": {
|
||||
"file": "dom2.js",
|
||||
|
|
@ -92,9 +81,9 @@
|
|||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.DNZBdkMD.js"
|
||||
"_exports.D-K_zMCo.js"
|
||||
],
|
||||
"integrity": "sha512-eOG+mc2zoH380efQ6N4Cnh0nERv9qSd82mIK22aD2+ePkWGxBbckpBmU/4s2e6gwCIYMPdv6/rYLDanOh2uyGA=="
|
||||
"integrity": "sha512-zesUzaLaAzT1XJDxIRrX16Xhfz0jnKRri6HBUt7fopcaV/u1oyD4gkwlvwQ00SBGE8o8x9zb5zfbiSrG+56KAQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts": {
|
||||
"file": "erreurs.js",
|
||||
|
|
@ -102,9 +91,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_exports.DNZBdkMD.js"
|
||||
"_exports.D-K_zMCo.js"
|
||||
],
|
||||
"integrity": "sha512-ykMBUQPjclsVL4qWGXkiq+tqGW52l1MSRhIWNvdsYtEzvzi1Re3NjJGIpY7a+lWjRN16X+/4aJv51RseE5QJLA=="
|
||||
"integrity": "sha512-8jx0w9HHaZKMDXlVdNotzMQgSRiEz7kqlBgPNyc350Hj9qNBw+HN59E6S6aE8Cwfavx7bzOlKvjIzw44C/y0Tg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts": {
|
||||
"file": "gardes.js",
|
||||
|
|
@ -122,7 +111,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"_Either.wHNxn7Os.js"
|
||||
],
|
||||
"integrity": "sha512-ZCvgFy1JsChtCE1WKzJGZ0mtuV5wx6ZyyKrbgXebZjVBkphxMoRWh7cO36fFmbZQHBKE31xFqMaMfjbo4WUmJg=="
|
||||
"integrity": "sha512-/I7wyKvxLmRqqV/VPkMIpCO6ERcFxsNVO2qaF8vp9tFc00GtuFFzBpCnJZeeFR1FW9cGENex9Sq5bBBcmW2dfw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts": {
|
||||
"file": "messages.js",
|
||||
|
|
@ -130,16 +119,16 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.DNZBdkMD.js",
|
||||
"_exports.D-K_zMCo.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
],
|
||||
"integrity": "sha512-fbxkHJ+dD78V3jJxNI22q9vRA/87xL/1csLbOPh/vGSeFSqL868iQllvYrrvBYYS8BHU/zuFie8FKU8ViOI4pg=="
|
||||
"integrity": "sha512-ueOLzf6AclHDqUTAn6d2bKp/rlI6vfXPcH2iz8QoSPhDsh5XgMsHAkyb1RcUJFlbhNMMBz/2IN67UFrjZl3KHQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts": {
|
||||
"file": "reseau.js",
|
||||
|
|
@ -149,13 +138,23 @@
|
|||
"imports": [
|
||||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"_index.CeK6pfoJ.js",
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||
"_exports.DNZBdkMD.js"
|
||||
"_exports.D-K_zMCo.js"
|
||||
],
|
||||
"integrity": "sha512-rYJVfAjK4yjdel1Hj/dSSjrMmmohoh3ZgxV8axshZRzWCRx+kHXdlSdbCQkjkVf2gBogyxR2XdPA1FeggbBRwA=="
|
||||
"integrity": "sha512-OLtCV6IaAkXA3zvwQ3mIh/92DSm3bhEpo+c9UG7Z53+JrSJIPw+qHQYgDh3ev7kfEMGrtdBJsmjbDGc35veeFA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/adresses.ts": {
|
||||
"file": "adresses.js",
|
||||
"name": "adresses",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/adresses.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.CCa5Y_L9.js"
|
||||
],
|
||||
"integrity": "sha512-jKIONskkSs0NFR/cmkT7qtXsnMDNRXS9tPRhT+rKzwoErAgAnHuBKooSpf/OFsDKC1lkZrzbVZjBcKTXgFubzg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts": {
|
||||
"file": "cart-add-item.js",
|
||||
|
|
@ -163,9 +162,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js"
|
||||
"_index.CCa5Y_L9.js"
|
||||
],
|
||||
"integrity": "sha512-fQrjeEI68TDDvdoXWJjeCjm8uOTuxUFnD0R+kC4qwpz0f9+jSK61FnunzEmX+vCdeChtgxC6+YsQc44A0Jbrdg=="
|
||||
"integrity": "sha512-Fv0Uo9mdDj+0r41caJbUsgI/Y9l2DORQdWGNriQcmSbZa01rgFBO0cbmvdXFd/SLtuXAsou0LR2+tcopArD62A=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts": {
|
||||
"file": "cart-remove-item.js",
|
||||
|
|
@ -173,9 +172,20 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js"
|
||||
"_index.CCa5Y_L9.js"
|
||||
],
|
||||
"integrity": "sha512-XEl8qtAgWt8WmIpF+CzytbcnenDO6+odrS7pFqG2a7hQntcfYNCDe6kwDn4pJAigUMy9+vPXkJvfcvZZ3clcag=="
|
||||
"integrity": "sha512-+yl2DCnj7GEme8NFHsHXiDRXvtmiu5k2rAYjFIKC4+vj0OcdwwMe1PiA5NmxY7trJVlQ+cbod1jXuih52BwbyQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-customer.ts": {
|
||||
"file": "cart-update-customer.js",
|
||||
"name": "cart-update-customer",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-customer.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-THkmTxVm3dNONEjEq2KYH8OSWdZLz1DRgMDz5VaFxjvl+vitvyGaXdIFJrU+l+1TI+q5DtFJPFbqxnysmT0r3g=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts": {
|
||||
"file": "cart-update-item.js",
|
||||
|
|
@ -183,9 +193,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js"
|
||||
"_index.CCa5Y_L9.js"
|
||||
],
|
||||
"integrity": "sha512-zaAsrUzoUWFxRX8lzRWGeQ2WST58sfveci+yPSOJx0BFdhmBvyfR9ia2MnopxpS6mY6VBs7ONc4ZZJXdUfef8Q=="
|
||||
"integrity": "sha512-yMT1BHxguhSAOOcT+w+x9qEs8IyKsDvA+Efap2v+ZJcxjp5Re5bMmQpqM/PmdhusBOLKkMJIdculJj0Z3Ml+ng=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts": {
|
||||
"file": "cart.js",
|
||||
|
|
@ -193,10 +203,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
],
|
||||
"integrity": "sha512-MQsu03fXIuryciKJ8JleDihgKPWeBCpwnlfe8gd9eInUVHNhFKQ0mm9d+y4YzqSgOqzyJBWPJPDuNE/rgh+oFw=="
|
||||
"integrity": "sha512-fQTej3IG0FYaDBUsiAI19t5iloXlcHSUTb0RsXrE3VgieIVfdUDWiBxN+bIoTrsRMi8ZJVITSQtV4PVyQk4Rsw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts": {
|
||||
"file": "erreurs2.js",
|
||||
|
|
@ -204,9 +214,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js"
|
||||
"_index.CCa5Y_L9.js"
|
||||
],
|
||||
"integrity": "sha512-1N2MKFm51ZSyhneIyzIQ/ZZAF2zxmR4unSJq7PB/y1Al4nPbs83ARz4j/dWeL1KfFrCLGQeg0cPwby/TIDv3xg=="
|
||||
"integrity": "sha512-WnxjO9YyxH/KqyeIyTxMrWQ9Z10G/645ajz2fACKfJCAWuuiYEXXItwRsoFnnKfeYlyZRXEepcJJWxzubBsSeQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts": {
|
||||
"file": "messages2.js",
|
||||
|
|
@ -214,12 +224,12 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
],
|
||||
"integrity": "sha512-yH1YmpJ/akKOxNm2jJ8St8ogWDg0BzW6PHFoxnJUKPFUS9s8Po5n1d7mta5H36RW+YPWi5HBKwwPwpHKTi5x2g=="
|
||||
"integrity": "sha512-dsnjuUCQSYJFqA7Vp7sP28s35HhIa1VYSWUHWK7vXhgW2WjDwUbpDzieqN7vyRgwgsXVKGdD8hLS+NJm23O19w=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts": {
|
||||
"file": "utils.js",
|
||||
|
|
@ -231,9 +241,9 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"_exports.DNZBdkMD.js"
|
||||
"_exports.D-K_zMCo.js"
|
||||
],
|
||||
"integrity": "sha512-Esz8GswJlts6K+9frxi4+X4VLqIIUg32rBo3uHKZemX6I4B8nwV/lQfoEUmVTfv+XriXpDBB4MAcH2FoS5LHuA=="
|
||||
"integrity": "sha512-GbY58x/EIklbx4niIHz9o362sp1OXllGe7k7OEUfPzszYehf81x8haRqwB2TexTLfn81UjowgcIk2GFusmXaiA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
||||
"file": "scripts-bouton-panier.js",
|
||||
|
|
@ -248,14 +258,14 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_exports.DNZBdkMD.js",
|
||||
"_exports.D-K_zMCo.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
],
|
||||
"integrity": "sha512-jtkypPcc0juXoJRSdseHumcbNvkrCPOckgzxhtvo5R40QKZU5yrMZw7Zx7s98AgRF8tu9MOX2Ffc/3m+zVPrxQ=="
|
||||
"integrity": "sha512-lanrZj5Z0DqxP6rozyO78F5Wk2pcA6JCgAd6LiVCR3O/+QsdrfGm18QChaA+XMQU9kvb0NCRdJZxuIe3Ha/OKQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
||||
"file": "scripts-page-panier.js",
|
||||
|
|
@ -266,7 +276,7 @@
|
|||
"_chunk-RU7WR4KH.D5j7HXCF.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||
|
|
@ -275,17 +285,19 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-remove-item.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-customer.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-update-item.ts",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.DNZBdkMD.js",
|
||||
"_exports.D-K_zMCo.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"_index.CeK6pfoJ.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-frsxWig5fJoeOmWOYe+D8/1sa++UXTOOhuBSVaXzuv5I1+QFRw0jr3VCGQURdoS0+NlvxJbqdBCSB2Ej8IVgmw=="
|
||||
"integrity": "sha512-YNbhd8qcZTJ/5yIhr6FbJJRb44VdCQlxaEuA2Hbb6UG6dYsh1QwUO4MFvmJj6r+qFGN0p/yftAbEJIptrNbiBQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
||||
"file": "scripts-page-produit.js",
|
||||
|
|
@ -297,22 +309,22 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"_chunk-7BKSRZNG.C39W3Wne.js",
|
||||
"_index.CeK6pfoJ.js",
|
||||
"_index.DD7qm8S6.js",
|
||||
"_index.CCa5Y_L9.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/api.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/cart-add-item.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/erreurs.ts",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.DNZBdkMD.js",
|
||||
"_exports.D-K_zMCo.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts"
|
||||
],
|
||||
"integrity": "sha512-PbnUCgzOC1/ctNi2EMfUGP43tfVYEY/LEYXyPTqVnYM1IqfS9TVxRE98z1au54cRkP9ie0pp+Y3ARWzLgUSPaw=="
|
||||
"integrity": "sha512-wmjIbZCeICj0EF00ozg1W3Iso/Mc3kILlndDYLIFu9/t2E4aS9xnD3gdbIXAUyAgokZW1a5P0jShEaNvyd2MAw=="
|
||||
}
|
||||
}
|
||||
31
web/app/themes/haiku-atelier-2024/assets/js/adresses.js
Normal file
31
web/app/themes/haiku-atelier-2024/assets/js/adresses.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { o as object, s as string, c as pipe, e as email } from "./index.CCa5Y_L9.js";
|
||||
const WCStoreBillingAddressSchema = object({
|
||||
address_1: string(),
|
||||
address_2: string(),
|
||||
city: string(),
|
||||
company: string(),
|
||||
country: string(),
|
||||
email: pipe(string(), email()),
|
||||
first_name: string(),
|
||||
last_name: string(),
|
||||
phone: string(),
|
||||
postcode: string(),
|
||||
state: string()
|
||||
});
|
||||
const WCStoreShippingAddressSchema = object({
|
||||
address_1: string(),
|
||||
address_2: string(),
|
||||
city: string(),
|
||||
company: string(),
|
||||
country: string(),
|
||||
first_name: string(),
|
||||
last_name: string(),
|
||||
phone: string(),
|
||||
postcode: string(),
|
||||
state: string()
|
||||
});
|
||||
export {
|
||||
WCStoreBillingAddressSchema as W,
|
||||
WCStoreShippingAddressSchema as a
|
||||
};
|
||||
//# sourceMappingURL=adresses.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"adresses.js","sources":["../../src/scripts/lib/schemas/adresses.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nexport const WCStoreBillingAddressSchema = v.object({\n address_1: v.string(),\n address_2: v.string(),\n city: v.string(),\n company: v.string(),\n country: v.string(),\n email: v.pipe(v.string(), v.email()),\n first_name: v.string(),\n last_name: v.string(),\n phone: v.string(),\n postcode: v.string(),\n state: v.string(),\n});\n\nexport const WCStoreShippingAddressSchema = v.object({\n address_1: v.string(),\n address_2: v.string(),\n city: v.string(),\n company: v.string(),\n country: v.string(),\n first_name: v.string(),\n last_name: v.string(),\n phone: v.string(),\n postcode: v.string(),\n state: v.string(),\n});\n"],"names":["v.object","v.string","v.pipe","v.email"],"mappings":";AAEa,MAAA,8BAA8BA,OAAS;AAAA,EAClD,WAAWC,OAAS;AAAA,EACpB,WAAWA,OAAS;AAAA,EACpB,MAAMA,OAAS;AAAA,EACf,SAASA,OAAS;AAAA,EAClB,SAASA,OAAS;AAAA,EAClB,OAAOC,KAAOD,OAAY,GAAAE,OAAS;AAAA,EACnC,YAAYF,OAAS;AAAA,EACrB,WAAWA,OAAS;AAAA,EACpB,OAAOA,OAAS;AAAA,EAChB,UAAUA,OAAS;AAAA,EACnB,OAAOA,OAAS;AAClB,CAAC;AAEY,MAAA,+BAA+BD,OAAS;AAAA,EACnD,WAAWC,OAAS;AAAA,EACpB,WAAWA,OAAS;AAAA,EACpB,MAAMA,OAAS;AAAA,EACf,SAASA,OAAS;AAAA,EAClB,SAASA,OAAS;AAAA,EAClB,YAAYA,OAAS;AAAA,EACrB,WAAWA,OAAS;AAAA,EACpB,OAAOA,OAAS;AAAA,EAChB,UAAUA,OAAS;AAAA,EACnB,OAAOA,OAAS;AAClB,CAAC;"}
|
||||
|
|
@ -1,307 +1,20 @@
|
|||
import { e as ROUTE_API_PANIER } from "./api2.js";
|
||||
import { r as right } from "./Either.wHNxn7Os.js";
|
||||
const JSON_MIME = "application/json";
|
||||
const CONTENT_TYPE_HEADER = "Content-Type";
|
||||
const FETCH_ERROR = Symbol();
|
||||
const CATCHER_FALLBACK = Symbol();
|
||||
function extractContentType(headers = {}) {
|
||||
var _a;
|
||||
return (_a = Object.entries(headers).find(([k]) => k.toLowerCase() === CONTENT_TYPE_HEADER.toLowerCase())) === null || _a === void 0 ? void 0 : _a[1];
|
||||
}
|
||||
function isLikelyJsonMime(value) {
|
||||
return /^application\/.*json.*/.test(value);
|
||||
}
|
||||
const mix = function(one, two, mergeArrays = false) {
|
||||
return Object.entries(two).reduce((acc, [key, newValue]) => {
|
||||
const value = one[key];
|
||||
if (Array.isArray(value) && Array.isArray(newValue)) {
|
||||
acc[key] = mergeArrays ? [...value, ...newValue] : newValue;
|
||||
} else if (typeof value === "object" && typeof newValue === "object") {
|
||||
acc[key] = mix(value, newValue, mergeArrays);
|
||||
} else {
|
||||
acc[key] = newValue;
|
||||
}
|
||||
return acc;
|
||||
}, { ...one });
|
||||
const CHEMIN_API_REST = "wp-json";
|
||||
const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;
|
||||
const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;
|
||||
const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;
|
||||
const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;
|
||||
const ROUTE_API_MAJ_CLIENT = `/${CHEMIN_API_REST}/wc/store/cart/update-customer`;
|
||||
const ENTETE_WC_NONCE = "Nonce";
|
||||
const ENTETE_GLITCHTIP_RETRY_AFTER = "retry-after";
|
||||
const ENTETE_GLITCHTIP_RATE_LIMITS = "x-sentry-rate-limits";
|
||||
export {
|
||||
ENTETE_GLITCHTIP_RATE_LIMITS as E,
|
||||
ROUTE_API_RETIRE_ARTICLE_PANIER as R,
|
||||
ENTETE_GLITCHTIP_RETRY_AFTER as a,
|
||||
ROUTE_API_MAJ_ARTICLE_PANIER as b,
|
||||
ROUTE_API_MAJ_CLIENT as c,
|
||||
ROUTE_API_AJOUTE_ARTICLE_PANIER as d,
|
||||
ENTETE_WC_NONCE as e,
|
||||
ROUTE_API_PANIER as f
|
||||
};
|
||||
const config = {
|
||||
// Default options
|
||||
options: {},
|
||||
// Error type
|
||||
errorType: "text",
|
||||
// Polyfills
|
||||
polyfills: {
|
||||
// fetch: null,
|
||||
// FormData: null,
|
||||
// URL: null,
|
||||
// URLSearchParams: null,
|
||||
// performance: null,
|
||||
// PerformanceObserver: null,
|
||||
// AbortController: null,
|
||||
},
|
||||
polyfill(p, doThrow = true, instance = false, ...args) {
|
||||
const res = this.polyfills[p] || (typeof self !== "undefined" ? self[p] : null) || (typeof global !== "undefined" ? global[p] : null);
|
||||
if (doThrow && !res)
|
||||
throw new Error(p + " is not defined");
|
||||
return instance && res ? new res(...args) : res;
|
||||
}
|
||||
};
|
||||
function setOptions(options, replace = false) {
|
||||
config.options = replace ? options : mix(config.options, options);
|
||||
}
|
||||
function setPolyfills(polyfills, replace = false) {
|
||||
config.polyfills = replace ? polyfills : mix(config.polyfills, polyfills);
|
||||
}
|
||||
function setErrorType(errorType) {
|
||||
config.errorType = errorType;
|
||||
}
|
||||
const middlewareHelper = (middlewares) => (fetchFunction) => {
|
||||
return middlewares.reduceRight((acc, curr) => curr(acc), fetchFunction) || fetchFunction;
|
||||
};
|
||||
class WretchError extends Error {
|
||||
}
|
||||
const resolver = (wretch) => {
|
||||
const sharedState = /* @__PURE__ */ Object.create(null);
|
||||
wretch = wretch._addons.reduce((w, addon) => addon.beforeRequest && addon.beforeRequest(w, wretch._options, sharedState) || w, wretch);
|
||||
const { _url: url, _options: opts, _config: config2, _catchers, _resolvers: resolvers, _middlewares: middlewares, _addons: addons } = wretch;
|
||||
const catchers = new Map(_catchers);
|
||||
const finalOptions = mix(config2.options, opts);
|
||||
let finalUrl = url;
|
||||
const _fetchReq = middlewareHelper(middlewares)((url2, options) => {
|
||||
finalUrl = url2;
|
||||
return config2.polyfill("fetch")(url2, options);
|
||||
})(url, finalOptions);
|
||||
const referenceError = new Error();
|
||||
const throwingPromise = _fetchReq.catch((error) => {
|
||||
throw { [FETCH_ERROR]: error };
|
||||
}).then((response) => {
|
||||
var _a;
|
||||
if (!response.ok) {
|
||||
const err = new WretchError();
|
||||
err["cause"] = referenceError;
|
||||
err.stack = err.stack + "\nCAUSE: " + referenceError.stack;
|
||||
err.response = response;
|
||||
err.status = response.status;
|
||||
err.url = finalUrl;
|
||||
if (response.type === "opaque") {
|
||||
throw err;
|
||||
}
|
||||
const jsonErrorType = config2.errorType === "json" || ((_a = response.headers.get("Content-Type")) === null || _a === void 0 ? void 0 : _a.split(";")[0]) === "application/json";
|
||||
const bodyPromise = !config2.errorType ? Promise.resolve(response.body) : jsonErrorType ? response.text() : response[config2.errorType]();
|
||||
return bodyPromise.then((body) => {
|
||||
err.message = typeof body === "string" ? body : response.statusText;
|
||||
if (body) {
|
||||
if (jsonErrorType && typeof body === "string") {
|
||||
err.text = body;
|
||||
err.json = JSON.parse(body);
|
||||
} else {
|
||||
err[config2.errorType] = body;
|
||||
}
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
return response;
|
||||
});
|
||||
const catchersWrapper = (promise) => {
|
||||
return promise.catch((err) => {
|
||||
const fetchErrorFlag = Object.prototype.hasOwnProperty.call(err, FETCH_ERROR);
|
||||
const error = fetchErrorFlag ? err[FETCH_ERROR] : err;
|
||||
const catcher = (error === null || error === void 0 ? void 0 : error.status) && catchers.get(error.status) || catchers.get(error === null || error === void 0 ? void 0 : error.name) || fetchErrorFlag && catchers.has(FETCH_ERROR) && catchers.get(FETCH_ERROR);
|
||||
if (catcher)
|
||||
return catcher(error, wretch);
|
||||
const catcherFallback = catchers.get(CATCHER_FALLBACK);
|
||||
if (catcherFallback)
|
||||
return catcherFallback(error, wretch);
|
||||
throw error;
|
||||
});
|
||||
};
|
||||
const bodyParser = (funName) => (cb) => funName ? (
|
||||
// If a callback is provided, then callback with the body result otherwise return the parsed body itself.
|
||||
catchersWrapper(throwingPromise.then((_) => _ && _[funName]()).then((_) => cb ? cb(_) : _))
|
||||
) : (
|
||||
// No body parsing method - return the response
|
||||
catchersWrapper(throwingPromise.then((_) => cb ? cb(_) : _))
|
||||
);
|
||||
const responseChain = {
|
||||
_wretchReq: wretch,
|
||||
_fetchReq,
|
||||
_sharedState: sharedState,
|
||||
res: bodyParser(null),
|
||||
json: bodyParser("json"),
|
||||
blob: bodyParser("blob"),
|
||||
formData: bodyParser("formData"),
|
||||
arrayBuffer: bodyParser("arrayBuffer"),
|
||||
text: bodyParser("text"),
|
||||
error(errorId, cb) {
|
||||
catchers.set(errorId, cb);
|
||||
return this;
|
||||
},
|
||||
badRequest(cb) {
|
||||
return this.error(400, cb);
|
||||
},
|
||||
unauthorized(cb) {
|
||||
return this.error(401, cb);
|
||||
},
|
||||
forbidden(cb) {
|
||||
return this.error(403, cb);
|
||||
},
|
||||
notFound(cb) {
|
||||
return this.error(404, cb);
|
||||
},
|
||||
timeout(cb) {
|
||||
return this.error(408, cb);
|
||||
},
|
||||
internalError(cb) {
|
||||
return this.error(500, cb);
|
||||
},
|
||||
fetchError(cb) {
|
||||
return this.error(FETCH_ERROR, cb);
|
||||
}
|
||||
};
|
||||
const enhancedResponseChain = addons.reduce((chain, addon) => ({
|
||||
...chain,
|
||||
...typeof addon.resolver === "function" ? addon.resolver(chain) : addon.resolver
|
||||
}), responseChain);
|
||||
return resolvers.reduce((chain, r) => r(chain, wretch), enhancedResponseChain);
|
||||
};
|
||||
const core = {
|
||||
_url: "",
|
||||
_options: {},
|
||||
_config: config,
|
||||
_catchers: /* @__PURE__ */ new Map(),
|
||||
_resolvers: [],
|
||||
_deferred: [],
|
||||
_middlewares: [],
|
||||
_addons: [],
|
||||
addon(addon) {
|
||||
return { ...this, _addons: [...this._addons, addon], ...addon.wretch };
|
||||
},
|
||||
errorType(errorType) {
|
||||
return {
|
||||
...this,
|
||||
_config: {
|
||||
...this._config,
|
||||
errorType
|
||||
}
|
||||
};
|
||||
},
|
||||
polyfills(polyfills, replace = false) {
|
||||
return {
|
||||
...this,
|
||||
_config: {
|
||||
...this._config,
|
||||
polyfills: replace ? polyfills : mix(this._config.polyfills, polyfills)
|
||||
}
|
||||
};
|
||||
},
|
||||
url(_url, replace = false) {
|
||||
if (replace)
|
||||
return { ...this, _url };
|
||||
const split = this._url.split("?");
|
||||
return {
|
||||
...this,
|
||||
_url: split.length > 1 ? split[0] + _url + "?" + split[1] : this._url + _url
|
||||
};
|
||||
},
|
||||
options(options, replace = false) {
|
||||
return { ...this, _options: replace ? options : mix(this._options, options) };
|
||||
},
|
||||
headers(headerValues) {
|
||||
const headers = !headerValues ? {} : Array.isArray(headerValues) ? Object.fromEntries(headerValues) : "entries" in headerValues ? Object.fromEntries(headerValues.entries()) : headerValues;
|
||||
return { ...this, _options: mix(this._options, { headers }) };
|
||||
},
|
||||
accept(headerValue) {
|
||||
return this.headers({ Accept: headerValue });
|
||||
},
|
||||
content(headerValue) {
|
||||
return this.headers({ [CONTENT_TYPE_HEADER]: headerValue });
|
||||
},
|
||||
auth(headerValue) {
|
||||
return this.headers({ Authorization: headerValue });
|
||||
},
|
||||
catcher(errorId, catcher) {
|
||||
const newMap = new Map(this._catchers);
|
||||
newMap.set(errorId, catcher);
|
||||
return { ...this, _catchers: newMap };
|
||||
},
|
||||
catcherFallback(catcher) {
|
||||
return this.catcher(CATCHER_FALLBACK, catcher);
|
||||
},
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
resolve(resolver2, clear = false) {
|
||||
return { ...this, _resolvers: clear ? [resolver2] : [...this._resolvers, resolver2] };
|
||||
},
|
||||
defer(callback, clear = false) {
|
||||
return {
|
||||
...this,
|
||||
_deferred: clear ? [callback] : [...this._deferred, callback]
|
||||
};
|
||||
},
|
||||
middlewares(middlewares, clear = false) {
|
||||
return {
|
||||
...this,
|
||||
_middlewares: clear ? middlewares : [...this._middlewares, ...middlewares]
|
||||
};
|
||||
},
|
||||
fetch(method = this._options.method, url = "", body = null) {
|
||||
let base = this.url(url).options({ method });
|
||||
const contentType = extractContentType(base._options.headers);
|
||||
const formDataClass = this._config.polyfill("FormData", false);
|
||||
const jsonify = typeof body === "object" && !(formDataClass && body instanceof formDataClass) && (!base._options.headers || !contentType || isLikelyJsonMime(contentType));
|
||||
base = !body ? base : jsonify ? base.json(body, contentType) : base.body(body);
|
||||
return resolver(base._deferred.reduce((acc, curr) => curr(acc, acc._url, acc._options), base));
|
||||
},
|
||||
get(url = "") {
|
||||
return this.fetch("GET", url);
|
||||
},
|
||||
delete(url = "") {
|
||||
return this.fetch("DELETE", url);
|
||||
},
|
||||
put(body, url = "") {
|
||||
return this.fetch("PUT", url, body);
|
||||
},
|
||||
post(body, url = "") {
|
||||
return this.fetch("POST", url, body);
|
||||
},
|
||||
patch(body, url = "") {
|
||||
return this.fetch("PATCH", url, body);
|
||||
},
|
||||
head(url = "") {
|
||||
return this.fetch("HEAD", url);
|
||||
},
|
||||
opts(url = "") {
|
||||
return this.fetch("OPTIONS", url);
|
||||
},
|
||||
body(contents) {
|
||||
return { ...this, _options: { ...this._options, body: contents } };
|
||||
},
|
||||
json(jsObject, contentType) {
|
||||
const currentContentType = extractContentType(this._options.headers);
|
||||
return this.content(contentType || isLikelyJsonMime(currentContentType) && currentContentType || JSON_MIME).body(JSON.stringify(jsObject));
|
||||
}
|
||||
};
|
||||
function factory(_url = "", _options = {}) {
|
||||
return { ...core, _url, _options };
|
||||
}
|
||||
factory["default"] = factory;
|
||||
factory.options = setOptions;
|
||||
factory.errorType = setErrorType;
|
||||
factory.polyfills = setPolyfills;
|
||||
factory.WretchError = WretchError;
|
||||
fetch(
|
||||
ROUTE_API_PANIER,
|
||||
{
|
||||
credentials: "same-origin",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
method: "GET",
|
||||
mode: "same-origin",
|
||||
signal: AbortSignal.timeout(5e3)
|
||||
}
|
||||
).then(right);
|
||||
factory(ROUTE_API_PANIER).content("application/json").options({
|
||||
credentials: "same-origin",
|
||||
mode: "same-origin",
|
||||
signal: AbortSignal.timeout(5e3)
|
||||
}).get().json().catch();
|
||||
//# sourceMappingURL=api.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,18 +0,0 @@
|
|||
const CHEMIN_API_REST = "wp-json";
|
||||
const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;
|
||||
const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;
|
||||
const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;
|
||||
const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;
|
||||
const ENTETE_WC_NONCE = "Nonce";
|
||||
const ENTETE_GLITCHTIP_RETRY_AFTER = "retry-after";
|
||||
const ENTETE_GLITCHTIP_RATE_LIMITS = "x-sentry-rate-limits";
|
||||
export {
|
||||
ENTETE_GLITCHTIP_RATE_LIMITS as E,
|
||||
ROUTE_API_RETIRE_ARTICLE_PANIER as R,
|
||||
ENTETE_GLITCHTIP_RETRY_AFTER as a,
|
||||
ROUTE_API_MAJ_ARTICLE_PANIER as b,
|
||||
ROUTE_API_AJOUTE_ARTICLE_PANIER as c,
|
||||
ENTETE_WC_NONCE as d,
|
||||
ROUTE_API_PANIER as e
|
||||
};
|
||||
//# sourceMappingURL=api2.js.map
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"api2.js","sources":["../../src/scripts/constantes/api.ts"],"sourcesContent":["// Chemins et Routes pour l'API WordPress\nexport const CHEMIN_API_REST = \"wp-json\";\nexport const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;\nexport const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;\nexport const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;\nexport const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;\n\n// En-têtes\nexport const ENTETE_WC_NONCE = \"Nonce\";\nexport const ENTETE_GLITCHTIP_RETRY_AFTER = \"retry-after\";\nexport const ENTETE_GLITCHTIP_RATE_LIMITS = \"x-sentry-rate-limits\";\n"],"names":[],"mappings":"AACO,MAAM,kBAAkB;AAClB,MAAA,mBAAmB,IAAI,eAAe;AACtC,MAAA,kCAAkC,IAAI,eAAe;AACrD,MAAA,kCAAkC,IAAI,eAAe;AACrD,MAAA,+BAA+B,IAAI,eAAe;AAGxD,MAAM,kBAAkB;AACxB,MAAM,+BAA+B;AACrC,MAAM,+BAA+B;"}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, a as optional, p as parse, n as number, b as array, s as string } from "./index.DD7qm8S6.js";
|
||||
import { o as object, a as optional, p as parse, n as number, b as array, s as string } from "./index.CCa5Y_L9.js";
|
||||
const WCStoreCartAddItemArgsItemsSchema = object({
|
||||
/** Variation attribute name. */
|
||||
attribute: string(),
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"cart-add-item.js","sources":["../../src/scripts/lib/schemas/cart-add-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartAddItemArgs } from \"../types/api/cart-add-item\";\n\nexport const WCStoreCartAddItemArgsItemsSchema = v.object({\n /** Variation attribute name. */\n attribute: v.string(),\n /** Variation attribute value. */\n value: v.string(),\n});\n\nexport const WCStoreCartAddItemArgsSchema = v.object({\n /** The basket item product or variation ID. */\n id: v.optional(v.number()),\n /** Quantity of this item to add to the basket. */\n quantity: v.optional(v.number()),\n /** Chosen attributes (for variations). */\n variation: v.optional(v.array(WCStoreCartAddItemArgsItemsSchema)),\n});\n\nexport const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = (args) =>\n v.parse(WCStoreCartAddItemArgsSchema, args);\n"],"names":["v.object","v.string","v.optional","v.number","v.array","v.parse"],"mappings":";AAIa,MAAA,oCAAoCA,OAAS;AAAA;AAAA,EAExD,WAAWC,OAAS;AAAA;AAAA,EAEpB,OAAOA,OAAS;AAClB,CAAC;AAEY,MAAA,+BAA+BD,OAAS;AAAA;AAAA,EAEnD,IAAIE,SAAWC,QAAU;AAAA;AAAA,EAEzB,UAAUD,SAAWC,QAAU;AAAA;AAAA,EAE/B,WAAWD,SAAWE,MAAQ,iCAAiC,CAAC;AAClE,CAAC;AAEM,MAAM,8BAAyE,CAAC,SACrFC,MAAQ,8BAA8B,IAAI;"}
|
||||
{"version":3,"file":"cart-add-item.js","sources":["../../src/scripts/lib/schemas/cart-add-item.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport type { WCStoreCartAddItemArgs } from \"../types/api/cart-add-item\";\n\nexport const WCStoreCartAddItemArgsItemsSchema = v.object({\n /** Variation attribute name. */\n attribute: v.string(),\n /** Variation attribute value. */\n value: v.string(),\n});\n\nexport const WCStoreCartAddItemArgsSchema = v.object({\n /** The basket item product or variation ID. */\n id: v.optional(v.number()),\n /** Quantity of this item to add to the basket. */\n quantity: v.optional(v.number()),\n /** Chosen attributes (for variations). */\n variation: v.optional(v.array(WCStoreCartAddItemArgsItemsSchema)),\n});\n\nexport const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = args =>\n v.parse(WCStoreCartAddItemArgsSchema, args);\n"],"names":["v.object","v.string","v.optional","v.number","v.array","v.parse"],"mappings":";AAIa,MAAA,oCAAoCA,OAAS;AAAA;AAAA,EAExD,WAAWC,OAAS;AAAA;AAAA,EAEpB,OAAOA,OAAS;AAClB,CAAC;AAEY,MAAA,+BAA+BD,OAAS;AAAA;AAAA,EAEnD,IAAIE,SAAWC,QAAU;AAAA;AAAA,EAEzB,UAAUD,SAAWC,QAAU;AAAA;AAAA,EAE/B,WAAWD,SAAWE,MAAQ,iCAAiC,CAAC;AAClE,CAAC;AAEM,MAAM,8BAAyE,CAAA,SACpFC,MAAQ,8BAA8B,IAAI;"}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, s as string } from "./index.DD7qm8S6.js";
|
||||
import { o as object, s as string } from "./index.CCa5Y_L9.js";
|
||||
const WCStoreCartRemoveItemArgsSchema = object({
|
||||
/** Unique identifier (key) for the basket item. */
|
||||
key: string()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
import { o as object, a as optional } from "./index.CCa5Y_L9.js";
|
||||
import { W as WCStoreBillingAddressSchema, a as WCStoreShippingAddressSchema } from "./adresses.js";
|
||||
const WCStoreCartUpdateCustomerArgsSchema = object({
|
||||
billing_address: optional(WCStoreBillingAddressSchema),
|
||||
shipping_address: optional(WCStoreShippingAddressSchema)
|
||||
});
|
||||
export {
|
||||
WCStoreCartUpdateCustomerArgsSchema as W
|
||||
};
|
||||
//# sourceMappingURL=cart-update-customer.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"cart-update-customer.js","sources":["../../src/scripts/lib/schemas/cart-update-customer.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { WCStoreBillingAddressSchema, WCStoreShippingAddressSchema } from \"./adresses.ts\";\n\nexport const WCStoreCartUpdateCustomerArgsSchema = v.object({\n billing_address: v.optional(WCStoreBillingAddressSchema),\n shipping_address: v.optional(WCStoreShippingAddressSchema),\n});\n"],"names":["v.object","v.optional"],"mappings":";;AAIa,MAAA,sCAAsCA,OAAS;AAAA,EAC1D,iBAAiBC,SAAW,2BAA2B;AAAA,EACvD,kBAAkBA,SAAW,4BAA4B;AAC3D,CAAC;"}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, s as string, c as pipe, m as minValue, n as number } from "./index.DD7qm8S6.js";
|
||||
import { o as object, s as string, c as pipe, m as minValue, n as number } from "./index.CCa5Y_L9.js";
|
||||
const WCStoreCartUpdateItemArgsSchema = object({
|
||||
/** Unique identifier (key) for the basket item to update. */
|
||||
key: string(),
|
||||
|
|
|
|||
|
|
@ -1,60 +1,60 @@
|
|||
import { o as object, d as boolean, e as enum_, s as string, u as unknown, n as number, b as array, f as union, c as pipe, g as null_, h as url, j as integer } from "./index.DD7qm8S6.js";
|
||||
import { o as object, f as boolean, d as enum_, s as string, u as unknown, n as number, b as array, g as union, c as pipe, h as null_, j as url, k as integer } from "./index.CCa5Y_L9.js";
|
||||
import { C as CATALOG_VISIBILITIES } from "./cart2.js";
|
||||
const WCStoreCartItemTotalsSchema = object({
|
||||
"currency_code": string(),
|
||||
"currency_decimal_separator": string(),
|
||||
"currency_minor_unit": number(),
|
||||
"currency_prefix": string(),
|
||||
"currency_suffix": string(),
|
||||
"currency_symbol": string(),
|
||||
"currency_thousand_separator": string(),
|
||||
"line_subtotal": string(),
|
||||
"line_subtotal_tax": string(),
|
||||
"line_total": string(),
|
||||
"line_total_tax": string()
|
||||
currency_code: string(),
|
||||
currency_decimal_separator: string(),
|
||||
currency_minor_unit: number(),
|
||||
currency_prefix: string(),
|
||||
currency_suffix: string(),
|
||||
currency_symbol: string(),
|
||||
currency_thousand_separator: string(),
|
||||
line_subtotal: string(),
|
||||
line_subtotal_tax: string(),
|
||||
line_total: string(),
|
||||
line_total_tax: string()
|
||||
});
|
||||
const WCStoreCartItemSchema = object({
|
||||
"backorders_allowed": boolean(),
|
||||
"catalog_visibility": enum_(CATALOG_VISIBILITIES),
|
||||
"description": string(),
|
||||
"extensions": unknown(),
|
||||
"id": number(),
|
||||
"images": array(unknown()),
|
||||
"item_data": array(unknown()),
|
||||
"key": string(),
|
||||
"low_stock_remaining": union([null_()]),
|
||||
"name": string(),
|
||||
"permalink": pipe(string(), url()),
|
||||
"prices": unknown(),
|
||||
"quantity": number(),
|
||||
"quantity_limits": unknown(),
|
||||
"short_description": string(),
|
||||
"show_backorder_badge": boolean(),
|
||||
"sku": string(),
|
||||
"sold_individually": boolean(),
|
||||
"totals": WCStoreCartItemTotalsSchema,
|
||||
"type": string(),
|
||||
"variation": array(unknown())
|
||||
backorders_allowed: boolean(),
|
||||
catalog_visibility: enum_(CATALOG_VISIBILITIES),
|
||||
description: string(),
|
||||
extensions: unknown(),
|
||||
id: number(),
|
||||
images: array(unknown()),
|
||||
item_data: array(unknown()),
|
||||
key: string(),
|
||||
low_stock_remaining: union([null_()]),
|
||||
name: string(),
|
||||
permalink: pipe(string(), url()),
|
||||
prices: unknown(),
|
||||
quantity: number(),
|
||||
quantity_limits: unknown(),
|
||||
short_description: string(),
|
||||
show_backorder_badge: boolean(),
|
||||
sku: string(),
|
||||
sold_individually: boolean(),
|
||||
totals: WCStoreCartItemTotalsSchema,
|
||||
type: string(),
|
||||
variation: array(unknown())
|
||||
});
|
||||
const WCStoreCartTotalsSchema = object({
|
||||
"currency_code": string(),
|
||||
"currency_decimal_separator": string(),
|
||||
"currency_minor_unit": number(),
|
||||
"currency_prefix": string(),
|
||||
"currency_suffix": string(),
|
||||
"currency_symbol": string(),
|
||||
"currency_thousand_separator": string(),
|
||||
"tax_lines": array(unknown()),
|
||||
"total_discount": string(),
|
||||
"total_discount_tax": string(),
|
||||
"total_fees": string(),
|
||||
"total_fees_tax": string(),
|
||||
"total_items": string(),
|
||||
"total_items_tax": string(),
|
||||
"total_price": string(),
|
||||
"total_shipping": union([string(), null_()]),
|
||||
"total_shipping_tax": union([string(), null_()]),
|
||||
"total_tax": string()
|
||||
currency_code: string(),
|
||||
currency_decimal_separator: string(),
|
||||
currency_minor_unit: number(),
|
||||
currency_prefix: string(),
|
||||
currency_suffix: string(),
|
||||
currency_symbol: string(),
|
||||
currency_thousand_separator: string(),
|
||||
tax_lines: array(unknown()),
|
||||
total_discount: string(),
|
||||
total_discount_tax: string(),
|
||||
total_fees: string(),
|
||||
total_fees_tax: string(),
|
||||
total_items: string(),
|
||||
total_items_tax: string(),
|
||||
total_price: string(),
|
||||
total_shipping: union([string(), null_()]),
|
||||
total_shipping_tax: union([string(), null_()]),
|
||||
total_tax: string()
|
||||
});
|
||||
const WCStoreCartSchema = object({
|
||||
billing_address: unknown(),
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"cart.js","sources":["../../src/scripts/lib/schemas/cart.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { CATALOG_VISIBILITIES } from \"../../constantes/cart.ts\";\n\nexport const WCStoreCartItemTotalsSchema = v.object({\n \"currency_code\": v.string(),\n \"currency_decimal_separator\": v.string(),\n \"currency_minor_unit\": v.number(),\n \"currency_prefix\": v.string(),\n \"currency_suffix\": v.string(),\n \"currency_symbol\": v.string(),\n \"currency_thousand_separator\": v.string(),\n \"line_subtotal\": v.string(),\n \"line_subtotal_tax\": v.string(),\n \"line_total\": v.string(),\n \"line_total_tax\": v.string(),\n});\n\nexport const WCStoreCartItemSchema = v.object({\n \"backorders_allowed\": v.boolean(),\n \"catalog_visibility\": v.enum(CATALOG_VISIBILITIES),\n \"description\": v.string(),\n \"extensions\": v.unknown(),\n \"id\": v.number(),\n \"images\": v.array(v.unknown()),\n \"item_data\": v.array(v.unknown()),\n \"key\": v.string(),\n \"low_stock_remaining\": v.union([v.null()]),\n \"name\": v.string(),\n \"permalink\": v.pipe(v.string(), v.url()),\n \"prices\": v.unknown(),\n \"quantity\": v.number(),\n \"quantity_limits\": v.unknown(),\n \"short_description\": v.string(),\n \"show_backorder_badge\": v.boolean(),\n \"sku\": v.string(),\n \"sold_individually\": v.boolean(),\n \"totals\": WCStoreCartItemTotalsSchema,\n \"type\": v.string(),\n \"variation\": v.array(v.unknown()),\n});\n\nexport const WCStoreCartTotalsSchema = v.object({\n \"currency_code\": v.string(),\n \"currency_decimal_separator\": v.string(),\n \"currency_minor_unit\": v.number(),\n \"currency_prefix\": v.string(),\n \"currency_suffix\": v.string(),\n \"currency_symbol\": v.string(),\n \"currency_thousand_separator\": v.string(),\n \"tax_lines\": v.array(v.unknown()),\n \"total_discount\": v.string(),\n \"total_discount_tax\": v.string(),\n \"total_fees\": v.string(),\n \"total_fees_tax\": v.string(),\n \"total_items\": v.string(),\n \"total_items_tax\": v.string(),\n \"total_price\": v.string(),\n \"total_shipping\": v.union([v.string(), v.null()]),\n \"total_shipping_tax\": v.union([v.string(), v.null()]),\n \"total_tax\": v.string(),\n});\n\nexport const WCStoreCartSchema = v.object({\n billing_address: v.unknown(),\n coupons: v.unknown(),\n cross_sells: v.unknown(),\n errors: v.unknown(),\n extensions: v.unknown(),\n fees: v.unknown(),\n has_calculated_shipping: v.unknown(),\n items: v.array(WCStoreCartItemSchema),\n items_count: v.pipe(v.number(), v.integer()),\n items_weight: v.unknown(),\n needs_payment: v.unknown(),\n needs_shipping: v.unknown(),\n payment_methods: v.unknown(),\n payment_requirements: v.unknown(),\n shipping_address: v.unknown(),\n shipping_rates: v.unknown(),\n totals: WCStoreCartTotalsSchema,\n});\n"],"names":["v.object","v.string","v.number","v.boolean","v.enum","v.unknown","v.array","v.union","v.null","v.pipe","v.url","v.integer"],"mappings":";;AAIa,MAAA,8BAA8BA,OAAS;AAAA,EAClD,iBAAiBC,OAAS;AAAA,EAC1B,8BAA8BA,OAAS;AAAA,EACvC,uBAAuBC,OAAS;AAAA,EAChC,mBAAmBD,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,+BAA+BA,OAAS;AAAA,EACxC,iBAAiBA,OAAS;AAAA,EAC1B,qBAAqBA,OAAS;AAAA,EAC9B,cAAcA,OAAS;AAAA,EACvB,kBAAkBA,OAAS;AAC7B,CAAC;AAEY,MAAA,wBAAwBD,OAAS;AAAA,EAC5C,sBAAsBG,QAAU;AAAA,EAChC,sBAAsBC,MAAO,oBAAoB;AAAA,EACjD,eAAeH,OAAS;AAAA,EACxB,cAAcI,QAAU;AAAA,EACxB,MAAMH,OAAS;AAAA,EACf,UAAUI,MAAQD,SAAW;AAAA,EAC7B,aAAaC,MAAQD,SAAW;AAAA,EAChC,OAAOJ,OAAS;AAAA,EAChB,uBAAuBM,MAAQ,CAACC,MAAE,CAAM,CAAC;AAAA,EACzC,QAAQP,OAAS;AAAA,EACjB,aAAaQ,KAAOR,OAAY,GAAAS,KAAO;AAAA,EACvC,UAAUL,QAAU;AAAA,EACpB,YAAYH,OAAS;AAAA,EACrB,mBAAmBG,QAAU;AAAA,EAC7B,qBAAqBJ,OAAS;AAAA,EAC9B,wBAAwBE,QAAU;AAAA,EAClC,OAAOF,OAAS;AAAA,EAChB,qBAAqBE,QAAU;AAAA,EAC/B,UAAU;AAAA,EACV,QAAQF,OAAS;AAAA,EACjB,aAAaK,MAAQD,SAAW;AAClC,CAAC;AAEY,MAAA,0BAA0BL,OAAS;AAAA,EAC9C,iBAAiBC,OAAS;AAAA,EAC1B,8BAA8BA,OAAS;AAAA,EACvC,uBAAuBC,OAAS;AAAA,EAChC,mBAAmBD,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,mBAAmBA,OAAS;AAAA,EAC5B,+BAA+BA,OAAS;AAAA,EACxC,aAAaK,MAAQD,SAAW;AAAA,EAChC,kBAAkBJ,OAAS;AAAA,EAC3B,sBAAsBA,OAAS;AAAA,EAC/B,cAAcA,OAAS;AAAA,EACvB,kBAAkBA,OAAS;AAAA,EAC3B,eAAeA,OAAS;AAAA,EACxB,mBAAmBA,OAAS;AAAA,EAC5B,eAAeA,OAAS;AAAA,EACxB,kBAAkBM,MAAQ,CAACN,UAAYO,MAAQ,CAAA,CAAC;AAAA,EAChD,sBAAsBD,MAAQ,CAACN,UAAYO,MAAQ,CAAA,CAAC;AAAA,EACpD,aAAaP,OAAS;AACxB,CAAC;AAEY,MAAA,oBAAoBD,OAAS;AAAA,EACxC,iBAAiBK,QAAU;AAAA,EAC3B,SAASA,QAAU;AAAA,EACnB,aAAaA,QAAU;AAAA,EACvB,QAAQA,QAAU;AAAA,EAClB,YAAYA,QAAU;AAAA,EACtB,MAAMA,QAAU;AAAA,EAChB,yBAAyBA,QAAU;AAAA,EACnC,OAAOC,MAAQ,qBAAqB;AAAA,EACpC,aAAaG,KAAOP,OAAY,GAAAS,SAAW;AAAA,EAC3C,cAAcN,QAAU;AAAA,EACxB,eAAeA,QAAU;AAAA,EACzB,gBAAgBA,QAAU;AAAA,EAC1B,iBAAiBA,QAAU;AAAA,EAC3B,sBAAsBA,QAAU;AAAA,EAChC,kBAAkBA,QAAU;AAAA,EAC5B,gBAAgBA,QAAU;AAAA,EAC1B,QAAQ;AACV,CAAC;"}
|
||||
{"version":3,"file":"cart.js","sources":["../../src/scripts/lib/schemas/cart.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { CATALOG_VISIBILITIES } from \"../../constantes/cart.ts\";\n\nexport const WCStoreCartItemTotalsSchema = v.object({\n currency_code: v.string(),\n currency_decimal_separator: v.string(),\n currency_minor_unit: v.number(),\n currency_prefix: v.string(),\n currency_suffix: v.string(),\n currency_symbol: v.string(),\n currency_thousand_separator: v.string(),\n line_subtotal: v.string(),\n line_subtotal_tax: v.string(),\n line_total: v.string(),\n line_total_tax: v.string(),\n});\n\nexport const WCStoreCartItemSchema = v.object({\n backorders_allowed: v.boolean(),\n catalog_visibility: v.enum(CATALOG_VISIBILITIES),\n description: v.string(),\n extensions: v.unknown(),\n id: v.number(),\n images: v.array(v.unknown()),\n item_data: v.array(v.unknown()),\n key: v.string(),\n low_stock_remaining: v.union([v.null()]),\n name: v.string(),\n permalink: v.pipe(v.string(), v.url()),\n prices: v.unknown(),\n quantity: v.number(),\n quantity_limits: v.unknown(),\n short_description: v.string(),\n show_backorder_badge: v.boolean(),\n sku: v.string(),\n sold_individually: v.boolean(),\n totals: WCStoreCartItemTotalsSchema,\n type: v.string(),\n variation: v.array(v.unknown()),\n});\n\nexport const WCStoreCartTotalsSchema = v.object({\n currency_code: v.string(),\n currency_decimal_separator: v.string(),\n currency_minor_unit: v.number(),\n currency_prefix: v.string(),\n currency_suffix: v.string(),\n currency_symbol: v.string(),\n currency_thousand_separator: v.string(),\n tax_lines: v.array(v.unknown()),\n total_discount: v.string(),\n total_discount_tax: v.string(),\n total_fees: v.string(),\n total_fees_tax: v.string(),\n total_items: v.string(),\n total_items_tax: v.string(),\n total_price: v.string(),\n total_shipping: v.union([v.string(), v.null()]),\n total_shipping_tax: v.union([v.string(), v.null()]),\n total_tax: v.string(),\n});\n\nexport const WCStoreCartSchema = v.object({\n billing_address: v.unknown(),\n coupons: v.unknown(),\n cross_sells: v.unknown(),\n errors: v.unknown(),\n extensions: v.unknown(),\n fees: v.unknown(),\n has_calculated_shipping: v.unknown(),\n items: v.array(WCStoreCartItemSchema),\n items_count: v.pipe(v.number(), v.integer()),\n items_weight: v.unknown(),\n needs_payment: v.unknown(),\n needs_shipping: v.unknown(),\n payment_methods: v.unknown(),\n payment_requirements: v.unknown(),\n shipping_address: v.unknown(),\n shipping_rates: v.unknown(),\n totals: WCStoreCartTotalsSchema,\n});\n"],"names":["v.object","v.string","v.number","v.boolean","v.enum","v.unknown","v.array","v.union","v.null","v.pipe","v.url","v.integer"],"mappings":";;AAIa,MAAA,8BAA8BA,OAAS;AAAA,EAClD,eAAeC,OAAS;AAAA,EACxB,4BAA4BA,OAAS;AAAA,EACrC,qBAAqBC,OAAS;AAAA,EAC9B,iBAAiBD,OAAS;AAAA,EAC1B,iBAAiBA,OAAS;AAAA,EAC1B,iBAAiBA,OAAS;AAAA,EAC1B,6BAA6BA,OAAS;AAAA,EACtC,eAAeA,OAAS;AAAA,EACxB,mBAAmBA,OAAS;AAAA,EAC5B,YAAYA,OAAS;AAAA,EACrB,gBAAgBA,OAAS;AAC3B,CAAC;AAEY,MAAA,wBAAwBD,OAAS;AAAA,EAC5C,oBAAoBG,QAAU;AAAA,EAC9B,oBAAoBC,MAAO,oBAAoB;AAAA,EAC/C,aAAaH,OAAS;AAAA,EACtB,YAAYI,QAAU;AAAA,EACtB,IAAIH,OAAS;AAAA,EACb,QAAQI,MAAQD,SAAW;AAAA,EAC3B,WAAWC,MAAQD,SAAW;AAAA,EAC9B,KAAKJ,OAAS;AAAA,EACd,qBAAqBM,MAAQ,CAACC,MAAE,CAAM,CAAC;AAAA,EACvC,MAAMP,OAAS;AAAA,EACf,WAAWQ,KAAOR,OAAY,GAAAS,KAAO;AAAA,EACrC,QAAQL,QAAU;AAAA,EAClB,UAAUH,OAAS;AAAA,EACnB,iBAAiBG,QAAU;AAAA,EAC3B,mBAAmBJ,OAAS;AAAA,EAC5B,sBAAsBE,QAAU;AAAA,EAChC,KAAKF,OAAS;AAAA,EACd,mBAAmBE,QAAU;AAAA,EAC7B,QAAQ;AAAA,EACR,MAAMF,OAAS;AAAA,EACf,WAAWK,MAAQD,SAAW;AAChC,CAAC;AAEY,MAAA,0BAA0BL,OAAS;AAAA,EAC9C,eAAeC,OAAS;AAAA,EACxB,4BAA4BA,OAAS;AAAA,EACrC,qBAAqBC,OAAS;AAAA,EAC9B,iBAAiBD,OAAS;AAAA,EAC1B,iBAAiBA,OAAS;AAAA,EAC1B,iBAAiBA,OAAS;AAAA,EAC1B,6BAA6BA,OAAS;AAAA,EACtC,WAAWK,MAAQD,SAAW;AAAA,EAC9B,gBAAgBJ,OAAS;AAAA,EACzB,oBAAoBA,OAAS;AAAA,EAC7B,YAAYA,OAAS;AAAA,EACrB,gBAAgBA,OAAS;AAAA,EACzB,aAAaA,OAAS;AAAA,EACtB,iBAAiBA,OAAS;AAAA,EAC1B,aAAaA,OAAS;AAAA,EACtB,gBAAgBM,MAAQ,CAACN,UAAYO,MAAQ,CAAA,CAAC;AAAA,EAC9C,oBAAoBD,MAAQ,CAACN,UAAYO,MAAQ,CAAA,CAAC;AAAA,EAClD,WAAWP,OAAS;AACtB,CAAC;AAEY,MAAA,oBAAoBD,OAAS;AAAA,EACxC,iBAAiBK,QAAU;AAAA,EAC3B,SAASA,QAAU;AAAA,EACnB,aAAaA,QAAU;AAAA,EACvB,QAAQA,QAAU;AAAA,EAClB,YAAYA,QAAU;AAAA,EACtB,MAAMA,QAAU;AAAA,EAChB,yBAAyBA,QAAU;AAAA,EACnC,OAAOC,MAAQ,qBAAqB;AAAA,EACpC,aAAaG,KAAOP,OAAY,GAAAS,SAAW;AAAA,EAC3C,cAAcN,QAAU;AAAA,EACxB,eAAeA,QAAU;AAAA,EACzB,gBAAgBA,QAAU;AAAA,EAC1B,iBAAiBA,QAAU;AAAA,EAC3B,sBAAsBA,QAAU;AAAA,EAChC,kBAAkBA,QAAU;AAAA,EAC5B,gBAAgBA,QAAU;AAAA,EAC1B,QAAQ;AACV,CAAC;"}
|
||||
|
|
@ -18,8 +18,10 @@ const SELECTEUR_PRIX_LIGNE_PANIER = ".detail-produit__nom-prix span";
|
|||
const SELECTEUR_SOUS_TOTAL_PANIER = "#panneau-panier .panneau__sous-totaux__ligne strong";
|
||||
const SELECTEUR_TOTAL_PANIER = "#panneau-panier .panneau__pied-de-page p span";
|
||||
const SELECTEUR_BOUTON_SEPARATION_ADRESSES = "#separation-adresses";
|
||||
const SELECTEUR_FORMULAIRE_PANIER = "#panneau-informations-client form";
|
||||
const SELECTEUR_FORMULAIRE_LIVRAISON = "#panneau-informations-client .panneau__formulaires__livraison";
|
||||
const SELECTEUR_FORMULAIRE_FACTURATION = "#panneau-informations-client .panneau__formulaires__facturation";
|
||||
const SELECTEUR_BOUTON_ACTIONS_FORMULAIRE = "#panneau-informations-client .panneau__pied-de-page button";
|
||||
export {
|
||||
ATTRIBUT_CONTIENT_ARTICLES as A,
|
||||
SELECTEUR_BOUTON_PANIER as S,
|
||||
|
|
@ -28,20 +30,22 @@ export {
|
|||
SELECTEUR_SOUS_TOTAL_PANIER as c,
|
||||
SELECTEUR_TOTAL_PANIER as d,
|
||||
SELECTEUR_BOUTON_SEPARATION_ADRESSES as e,
|
||||
SELECTEUR_FORMULAIRE_LIVRAISON as f,
|
||||
SELECTEUR_FORMULAIRE_FACTURATION as g,
|
||||
ATTRIBUT_CLE_PANIER as h,
|
||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE as i,
|
||||
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER as j,
|
||||
SELECTEUR_BOUTON_ADDITION_QUANTITE as k,
|
||||
SELECTEUR_BOUTON_SUPPRESSION_PANIER as l,
|
||||
SELECTEUR_PRIX_LIGNE_PANIER as m,
|
||||
ATTRIBUT_HIDDEN as n,
|
||||
ATTRIBUT_DESACTIVE as o,
|
||||
SELECTEUR_BOUTON_AJOUT_PANIER as p,
|
||||
SELECTEUR_SELECTEUR_QUANTITE as q,
|
||||
SELECTEUR_LIENS_ONGLETS as r,
|
||||
SELECTEUR_SECTIONS_CONTENUS as s,
|
||||
ATTRIBUT_ARIA_SELECTED as t
|
||||
SELECTEUR_FORMULAIRE_PANIER as f,
|
||||
SELECTEUR_FORMULAIRE_LIVRAISON as g,
|
||||
SELECTEUR_FORMULAIRE_FACTURATION as h,
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE as i,
|
||||
ATTRIBUT_CLE_PANIER as j,
|
||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE as k,
|
||||
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER as l,
|
||||
SELECTEUR_BOUTON_ADDITION_QUANTITE as m,
|
||||
SELECTEUR_BOUTON_SUPPRESSION_PANIER as n,
|
||||
SELECTEUR_PRIX_LIGNE_PANIER as o,
|
||||
ATTRIBUT_HIDDEN as p,
|
||||
ATTRIBUT_DESACTIVE as q,
|
||||
SELECTEUR_BOUTON_AJOUT_PANIER as r,
|
||||
SELECTEUR_SELECTEUR_QUANTITE as s,
|
||||
SELECTEUR_LIENS_ONGLETS as t,
|
||||
SELECTEUR_SECTIONS_CONTENUS as u,
|
||||
ATTRIBUT_ARIA_SELECTED as v
|
||||
};
|
||||
//# sourceMappingURL=dom.js.map
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"dom.js","sources":["../../src/scripts/constantes/dom.ts"],"sourcesContent":["/** Constantes de valeurs pour la manipulation du DOM : sélecteurs et attributs. */\n\nexport const ATTRIBUT_ARIA_SELECTED = \"aria-selected\";\nexport const ATTRIBUT_ARIA_HIDDEN = \"aria-hidden\";\nexport const ATTRIBUT_HIDDEN = \"hidden\";\nexport const ATTRIBUT_CONTIENT_ARTICLES = \"data-contient-articles\";\nexport const ATTRIBUT_DESACTIVE = \"disabled\";\nexport const ATTRIBUT_CLE_PANIER = \"data-cle-panier\";\n\nexport const SELECTEUR_CONTENEUR_PANIER = \"#page-panier\";\nexport const SELECTEUR_BOUTON_PANIER = \".compte-panier a[rel='cart']\";\nexport const SELECTEUR_SELECTEUR_QUANTITE = \"#selecteur-variation\";\nexport const SELECTEUR_BOUTON_AJOUT_PANIER = \"#bouton-ajout-panier\";\nexport const SELECTEUR_LIENS_ONGLETS = \"a[role='tab']\";\nexport const SELECTEUR_SECTIONS_CONTENUS = \"section[role='tabpanel']\";\n\n// Panier\nexport const SELECTEUR_ENTREES_PANIER = \"article\";\nexport const SELECTEUR_BOUTON_SUPPRESSION_PANIER = \"button.detail-produit__actions__suppression\";\nexport const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = \"button.detail-produit__actions__soustraction\";\nexport const SELECTEUR_BOUTON_ADDITION_QUANTITE = \"button.detail-produit__actions__addition\";\nexport const SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER = \"input\";\nexport const SELECTEUR_PRIX_LIGNE_PANIER = \".detail-produit__nom-prix span\";\nexport const SELECTEUR_SOUS_TOTAL_PANIER = \"#panneau-panier .panneau__sous-totaux__ligne strong\";\nexport const SELECTEUR_TOTAL_PANIER = \"#panneau-panier .panneau__pied-de-page p span\";\nexport const SELECTEUR_BOUTON_SEPARATION_ADRESSES = \"#separation-adresses\";\nexport const SELECTEUR_FORMULAIRE_LIVRAISON = \"#panneau-informations-client .panneau__formulaires__livraison\";\nexport const SELECTEUR_FORMULAIRE_FACTURATION = \"#panneau-informations-client .panneau__formulaires__facturation\";\n"],"names":[],"mappings":"AAEO,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB;AACxB,MAAM,6BAA6B;AACnC,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAE5B,MAAM,6BAA6B;AACnC,MAAM,0BAA0B;AAChC,MAAM,+BAA+B;AACrC,MAAM,gCAAgC;AACtC,MAAM,0BAA0B;AAChC,MAAM,8BAA8B;AAGpC,MAAM,2BAA2B;AACjC,MAAM,sCAAsC;AAC5C,MAAM,yCAAyC;AAC/C,MAAM,qCAAqC;AAC3C,MAAM,wCAAwC;AAC9C,MAAM,8BAA8B;AACpC,MAAM,8BAA8B;AACpC,MAAM,yBAAyB;AAC/B,MAAM,uCAAuC;AAC7C,MAAM,iCAAiC;AACvC,MAAM,mCAAmC;"}
|
||||
{"version":3,"file":"dom.js","sources":["../../src/scripts/constantes/dom.ts"],"sourcesContent":["/** Constantes de valeurs pour la manipulation du DOM : sélecteurs et attributs. */\n\nexport const ATTRIBUT_ARIA_SELECTED = \"aria-selected\";\nexport const ATTRIBUT_ARIA_HIDDEN = \"aria-hidden\";\nexport const ATTRIBUT_HIDDEN = \"hidden\";\nexport const ATTRIBUT_CONTIENT_ARTICLES = \"data-contient-articles\";\nexport const ATTRIBUT_DESACTIVE = \"disabled\";\nexport const ATTRIBUT_CLE_PANIER = \"data-cle-panier\";\n\nexport const SELECTEUR_CONTENEUR_PANIER = \"#page-panier\";\nexport const SELECTEUR_BOUTON_PANIER = \".compte-panier a[rel='cart']\";\nexport const SELECTEUR_SELECTEUR_QUANTITE = \"#selecteur-variation\";\nexport const SELECTEUR_BOUTON_AJOUT_PANIER = \"#bouton-ajout-panier\";\nexport const SELECTEUR_LIENS_ONGLETS = \"a[role='tab']\";\nexport const SELECTEUR_SECTIONS_CONTENUS = \"section[role='tabpanel']\";\n\n// Panier\nexport const SELECTEUR_ENTREES_PANIER = \"article\";\nexport const SELECTEUR_BOUTON_SUPPRESSION_PANIER = \"button.detail-produit__actions__suppression\";\nexport const SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE = \"button.detail-produit__actions__soustraction\";\nexport const SELECTEUR_BOUTON_ADDITION_QUANTITE = \"button.detail-produit__actions__addition\";\nexport const SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER = \"input\";\nexport const SELECTEUR_PRIX_LIGNE_PANIER = \".detail-produit__nom-prix span\";\nexport const SELECTEUR_SOUS_TOTAL_PANIER = \"#panneau-panier .panneau__sous-totaux__ligne strong\";\nexport const SELECTEUR_TOTAL_PANIER = \"#panneau-panier .panneau__pied-de-page p span\";\nexport const SELECTEUR_BOUTON_SEPARATION_ADRESSES = \"#separation-adresses\";\nexport const SELECTEUR_FORMULAIRE_PANIER = \"#panneau-informations-client form\";\nexport const SELECTEUR_FORMULAIRE_LIVRAISON = \"#panneau-informations-client .panneau__formulaires__livraison\";\nexport const SELECTEUR_FORMULAIRE_FACTURATION = \"#panneau-informations-client .panneau__formulaires__facturation\";\nexport const SELECTEUR_BOUTON_ACTIONS_FORMULAIRE = \"#panneau-informations-client .panneau__pied-de-page button\";\n"],"names":[],"mappings":"AAEO,MAAM,yBAAyB;AAE/B,MAAM,kBAAkB;AACxB,MAAM,6BAA6B;AACnC,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAE5B,MAAM,6BAA6B;AACnC,MAAM,0BAA0B;AAChC,MAAM,+BAA+B;AACrC,MAAM,gCAAgC;AACtC,MAAM,0BAA0B;AAChC,MAAM,8BAA8B;AAGpC,MAAM,2BAA2B;AACjC,MAAM,sCAAsC;AAC5C,MAAM,yCAAyC;AAC/C,MAAM,qCAAqC;AAC3C,MAAM,wCAAwC;AAC9C,MAAM,8BAA8B;AACpC,MAAM,8BAA8B;AACpC,MAAM,yBAAyB;AAC/B,MAAM,uCAAuC;AAC7C,MAAM,8BAA8B;AACpC,MAAM,iCAAiC;AACvC,MAAM,mCAAmC;AACzC,MAAM,sCAAsC;"}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import { e as creeSyntaxError, f as reporteEtLeveErreur, g as ERREUR_SYNTAXE_INVALIDE, h as ERREUR_SELECTEUR_INEXISTANT } from "./erreurs.js";
|
||||
import { E as Either, r as right, l as left } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
function n$1(l) {
|
||||
return l !== null;
|
||||
}
|
||||
|
|
@ -20,9 +20,9 @@ const recupereElementsOuLeve = (elementsOuErreur) => elementsOuErreur.caseOf({
|
|||
Right: identity
|
||||
});
|
||||
export {
|
||||
recupereElementAvecSelecteur as a,
|
||||
recupereElementsOuLeve as b,
|
||||
recupereElementsAvecSelecteur as c,
|
||||
recupereElementsAvecSelecteur as a,
|
||||
recupereElementAvecSelecteur as b,
|
||||
recupereElementsOuLeve as c,
|
||||
recupereElementOuLeve as r
|
||||
};
|
||||
//# sourceMappingURL=dom2.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import { $ as captureException } from "./exports.DNZBdkMD.js";
|
||||
import { $ as captureException } from "./exports.D-K_zMCo.js";
|
||||
const ERREUR_SYNTAXE_INVALIDE = (selecteur) => `Le selecteur "${selecteur}" est invalide`;
|
||||
const ERREUR_SELECTEUR_INEXISTANT = (selecteur) => `La requête "${selecteur}" n'a retourné aucun Élément.`;
|
||||
const creeSyntaxError = (message) => new SyntaxError(message);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { i as is, o as object, n as number, s as string } from "./index.DD7qm8S6.js";
|
||||
import { i as is, o as object, n as number, s as string } from "./index.CCa5Y_L9.js";
|
||||
const WCErrorBodySchema = object({
|
||||
code: string(),
|
||||
data: object({
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ function isError(wat) {
|
|||
case "[object Error]":
|
||||
case "[object Exception]":
|
||||
case "[object DOMException]":
|
||||
case "[object WebAssembly.Exception]":
|
||||
return true;
|
||||
default:
|
||||
return isInstanceOf(wat, Error);
|
||||
|
|
@ -80,7 +81,7 @@ function safeJoin(input, delimiter) {
|
|||
}
|
||||
return output.join(delimiter);
|
||||
}
|
||||
const SDK_VERSION = "8.33.1";
|
||||
const SDK_VERSION = "8.34.0-internal.0";
|
||||
const GLOBAL_OBJ = globalThis;
|
||||
function getGlobalSingleton(name, creator, obj) {
|
||||
const gbl = GLOBAL_OBJ;
|
||||
|
|
@ -2168,4 +2169,4 @@ export {
|
|||
isThenable as y,
|
||||
isPlainObject as z
|
||||
};
|
||||
//# sourceMappingURL=exports.DNZBdkMD.js.map
|
||||
//# sourceMappingURL=exports.D-K_zMCo.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import { E as ENTETE_GLITCHTIP_RATE_LIMITS, a as ENTETE_GLITCHTIP_RETRY_AFTER } from "./api2.js";
|
||||
import { i as isInstanceOf, t as truncate, c as consoleSandbox, D as DEBUG_BUILD$1, l as logger, g as getFunctionName, G as GLOBAL_OBJ, C as CONSOLE_LEVELS, f as fill, o as originalConsoleMethods, a as timestampInSeconds, b as isError, d as addNonEnumerableProperty, r as rejectedSyncPromise, S as SyncPromise, e as resolvedSyncPromise, h as dropUndefinedKeys, n as normalize, j as dateTimestampInSeconds, k as DEBUG_BUILD$2, u as urlEncode, m as uuid4, p as checkOrSetAlreadyCaught, q as isPrimitive, s as updateSession, v as prepareEvent, w as getDynamicSamplingContextFromClient, x as getIsolationScope, y as isThenable, z as isPlainObject, A as isParameterizedString, B as SDK_VERSION, E as getClient, F as getOriginalFunction, H as getFramesFromEvent, I as addExceptionMechanism, J as isErrorEvent$1, K as isDOMError, L as isDOMException, M as addExceptionTypeValue, N as isEvent, O as normalizeToSize, P as extractExceptionKeysForMessage, Q as isString, R as createStackParser, U as UNKNOWN_FUNCTION, T as getEventDescription, V as htmlTreeAsString, W as safeJoin, X as getComponentName, Y as captureEvent, Z as getLocationHref, _ as getCurrentScope } from "./exports.DNZBdkMD.js";
|
||||
import { E as ENTETE_GLITCHTIP_RATE_LIMITS, a as ENTETE_GLITCHTIP_RETRY_AFTER } from "./api.js";
|
||||
import { i as isInstanceOf, t as truncate, c as consoleSandbox, D as DEBUG_BUILD$1, l as logger, g as getFunctionName, G as GLOBAL_OBJ, C as CONSOLE_LEVELS, f as fill, o as originalConsoleMethods, a as timestampInSeconds, b as isError, d as addNonEnumerableProperty, r as rejectedSyncPromise, S as SyncPromise, e as resolvedSyncPromise, h as dropUndefinedKeys, n as normalize, j as dateTimestampInSeconds, k as DEBUG_BUILD$2, u as urlEncode, m as uuid4, p as checkOrSetAlreadyCaught, q as isPrimitive, s as updateSession, v as prepareEvent, w as getDynamicSamplingContextFromClient, x as getIsolationScope, y as isThenable, z as isPlainObject, A as isParameterizedString, B as SDK_VERSION, E as getClient, F as getOriginalFunction, H as getFramesFromEvent, I as addExceptionMechanism, J as isErrorEvent$1, K as isDOMError, L as isDOMException, M as addExceptionTypeValue, N as isEvent, O as normalizeToSize, P as extractExceptionKeysForMessage, Q as isString, R as createStackParser, U as UNKNOWN_FUNCTION, T as getEventDescription, V as htmlTreeAsString, W as safeJoin, X as getComponentName, Y as captureEvent, Z as getLocationHref, _ as getCurrentScope } from "./exports.D-K_zMCo.js";
|
||||
function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) {
|
||||
if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {
|
||||
return;
|
||||
|
|
@ -1644,7 +1644,7 @@ const DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|||
function exceptionFromError(stackParser, ex) {
|
||||
const frames = parseStackFrames(stackParser, ex);
|
||||
const exception = {
|
||||
type: ex && ex.name,
|
||||
type: extractType(ex),
|
||||
value: extractMessage(ex)
|
||||
};
|
||||
if (frames.length) {
|
||||
|
|
@ -1719,6 +1719,21 @@ function getPopFirstTopFrames(ex) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
function isWebAssemblyException(exception) {
|
||||
if (typeof WebAssembly !== "undefined" && typeof WebAssembly.Exception !== "undefined") {
|
||||
return exception instanceof WebAssembly.Exception;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function extractType(ex) {
|
||||
const name = ex && ex.name;
|
||||
if (!name && isWebAssemblyException(ex)) {
|
||||
const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;
|
||||
return hasTypeInMessage ? ex.message[0] : "WebAssembly.Exception";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
function extractMessage(ex) {
|
||||
const message = ex && ex.message;
|
||||
if (!message) {
|
||||
|
|
@ -1727,6 +1742,9 @@ function extractMessage(ex) {
|
|||
if (message.error && typeof message.error.message === "string") {
|
||||
return message.error.message;
|
||||
}
|
||||
if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {
|
||||
return ex.message[1];
|
||||
}
|
||||
return message;
|
||||
}
|
||||
function eventFromException(stackParser, exception, hint, attachStacktrace) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import { e as ROUTE_API_PANIER, d as ENTETE_WC_NONCE } from "./api2.js";
|
||||
import { f as ROUTE_API_PANIER, e as ENTETE_WC_NONCE } from "./api.js";
|
||||
import { E as Either, r as right, l as left, M as Maybe, n as nothing, j as just } from "./Either.wHNxn7Os.js";
|
||||
var _a$1;
|
||||
const helpers$1 = {
|
||||
|
|
@ -315,7 +315,7 @@ const requeteRecuperePanier = () => fetch(
|
|||
{
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: ETATS.nonce
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,7 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
|
||||
var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
|
||||
var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
|
||||
var store;
|
||||
function getGlobalConfig(config2) {
|
||||
return {
|
||||
|
|
@ -93,6 +94,23 @@ var ValiError = class extends Error {
|
|||
this.issues = issues;
|
||||
}
|
||||
};
|
||||
function email(message) {
|
||||
return {
|
||||
kind: "validation",
|
||||
type: "email",
|
||||
reference: email,
|
||||
expects: null,
|
||||
async: false,
|
||||
requirement: EMAIL_REGEX,
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
if (dataset.typed && !this.requirement.test(dataset.value)) {
|
||||
_addIssue(this, "email", dataset, config2);
|
||||
}
|
||||
return dataset;
|
||||
}
|
||||
};
|
||||
}
|
||||
function integer(message) {
|
||||
return {
|
||||
kind: "validation",
|
||||
|
|
@ -556,13 +574,14 @@ export {
|
|||
optional as a,
|
||||
array as b,
|
||||
pipe as c,
|
||||
boolean as d,
|
||||
enum_ as e,
|
||||
union as f,
|
||||
null_ as g,
|
||||
url as h,
|
||||
enum_ as d,
|
||||
email as e,
|
||||
boolean as f,
|
||||
union as g,
|
||||
null_ as h,
|
||||
is as i,
|
||||
integer as j,
|
||||
url as j,
|
||||
integer as k,
|
||||
minValue as m,
|
||||
number as n,
|
||||
object as o,
|
||||
|
|
@ -571,4 +590,4 @@ export {
|
|||
unknown as u,
|
||||
value as v
|
||||
};
|
||||
//# sourceMappingURL=index.DD7qm8S6.js.map
|
||||
//# sourceMappingURL=index.CCa5Y_L9.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +1,9 @@
|
|||
import { p as parse } from "./index.DD7qm8S6.js";
|
||||
import { p as parse } from "./index.CCa5Y_L9.js";
|
||||
import { N as NOM_CANAL_BOUTON_PANIER, T as TYPES_MESSAGES, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js";
|
||||
import { r as reporteErreur } from "./erreurs.js";
|
||||
import { M as MessageMajBoutonPanierSchema, a as MessageMajContenuPanierSchema } from "./messages2.js";
|
||||
import { E as Either } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
import "./cart.js";
|
||||
import "./cart2.js";
|
||||
const emetMessageMajBoutonPanier = (args) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { e as enum_, o as object, c as pipe, v as value, s as string, n as number, b as array } from "./index.DD7qm8S6.js";
|
||||
import { d as enum_, o as object, c as pipe, v as value, s as string, n as number, b as array } from "./index.CCa5Y_L9.js";
|
||||
import { T as TYPES_MESSAGES } from "./messages3.js";
|
||||
import { a as WCStoreCartItemSchema } from "./cart.js";
|
||||
import "./cart2.js";
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { p as parse } from "./index.DD7qm8S6.js";
|
||||
import { d as ENTETE_WC_NONCE } from "./api2.js";
|
||||
import { p as parse } from "./index.CCa5Y_L9.js";
|
||||
import { e as ENTETE_WC_NONCE } from "./api.js";
|
||||
import { a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, d as leveErreur, E as ErreurInconnue } from "./erreurs.js";
|
||||
import { e as estWCError } from "./erreurs2.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
const postBackend = (args) => fetch(
|
||||
args.route,
|
||||
{
|
||||
body: args.corps,
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: args.nonce
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"reseau.js","sources":["../../src/scripts/lib/reseau.ts"],"sourcesContent":["import { pipe } from \"remeda\";\nimport { match, P } from \"ts-pattern\";\nimport { type GenericSchema, parse } from \"valibot\";\n\nimport { ENTETE_WC_NONCE } from \"../constantes/api.ts\";\nimport {\n ErreurInconnue,\n leveBadRequestError,\n leveErreur,\n leveNotFoundError,\n leveUnauthorizedError,\n type UnknownError,\n} from \"./erreurs.ts\";\nimport { estWCError } from \"./schemas/erreurs.ts\";\n\ntype ArgumentsPostBackendWC = {\n /** Le corps de la requête (ses arguments). */\n corps: BodyInit;\n /** Une chaîne de caractères généré par le backend et à joindre à chaque requête pour l'authentifier. */\n nonce: string;\n /** La route, ou chemin, de l'API à demander au backend. */\n route: string;\n};\n\nexport const postBackend = (args: ArgumentsPostBackendWC) =>\n fetch(\n args.route,\n {\n body: args.corps,\n credentials: \"same-origin\",\n headers: {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n [ENTETE_WC_NONCE]: args.nonce,\n },\n method: \"POST\",\n mode: \"same-origin\",\n signal: AbortSignal.timeout(5000),\n },\n );\n\nexport const traiteReponseBackendWCSelonCodesHTTP = <R, S extends GenericSchema<R>>(\n corpsReponse: unknown,\n schemaReponse: S,\n): R =>\n match(corpsReponse)\n // Réponses problématiques\n .with({ body: P.select(), status: 400 }, estWCError, leveBadRequestError)\n .with({ body: P.select(), status: 401 }, estWCError, leveUnauthorizedError)\n .with({ body: P.select(), status: 404 }, estWCError, leveNotFoundError)\n // Réponse OK (201)\n .with(P._, corpsOkInconnu => parse<S>(schemaReponse, corpsOkInconnu))\n // Réponses inconnues\n .otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>));\n"],"names":["match","P","pipe"],"mappings":";;;;;;;AAwBa,MAAA,cAAc,CAAC,SAC1B;AAAA,EACE,KAAK;AAAA,EACL;AAAA,IACE,MAAM,KAAK;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,MACP,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,CAAC,eAAe,GAAG,KAAK;AAAA,IAC1B;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,QAAQ,YAAY,QAAQ,GAAI;AAAA,EAClC;AACF;AAEW,MAAA,uCAAuC,CAClD,cACA,kBAEAA,EAAM,YAAY,EAEf,KAAK,EAAE,MAAMC,EAAE,OAAO,GAAG,QAAQ,IAAO,GAAA,YAAY,mBAAmB,EACvE,KAAK,EAAE,MAAMA,EAAE,UAAU,QAAQ,IAAA,GAAO,YAAY,qBAAqB,EACzE,KAAK,EAAE,MAAMA,EAAE,OAAA,GAAU,QAAQ,IAAI,GAAG,YAAY,iBAAiB,EAErE,KAAKA,EAAE,GAAG,CAAkB,mBAAA,MAAS,eAAe,cAAc,CAAC,EAEnE,UAAU,CAAA,MAAKC,EAAK,GAAG,gBAAgB,UAAwB,CAAC;"}
|
||||
{"version":3,"file":"reseau.js","sources":["../../src/scripts/lib/reseau.ts"],"sourcesContent":["import { pipe } from \"remeda\";\nimport { match, P } from \"ts-pattern\";\nimport { type GenericSchema, parse } from \"valibot\";\n\nimport { ENTETE_WC_NONCE } from \"../constantes/api.ts\";\nimport {\n ErreurInconnue,\n leveBadRequestError,\n leveErreur,\n leveNotFoundError,\n leveUnauthorizedError,\n type UnknownError,\n} from \"./erreurs.ts\";\nimport { estWCError } from \"./schemas/erreurs.ts\";\n\ntype ArgumentsPostBackendWC = {\n /** Le corps de la requête (ses arguments). */\n corps: BodyInit;\n /** Une chaîne de caractères généré par le backend et à joindre à chaque requête pour l'authentifier. */\n nonce: string;\n /** La route, ou chemin, de l'API à demander au backend. */\n route: string;\n};\n\nexport const postBackend = (args: ArgumentsPostBackendWC) =>\n fetch(\n args.route,\n {\n body: args.corps,\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n [ENTETE_WC_NONCE]: args.nonce,\n },\n method: \"POST\",\n mode: \"same-origin\",\n signal: AbortSignal.timeout(5000),\n },\n );\n\nexport const traiteReponseBackendWCSelonCodesHTTP = <R, S extends GenericSchema<R>>(\n corpsReponse: unknown,\n schemaReponse: S,\n): R =>\n match(corpsReponse)\n // Réponses problématiques\n .with({ body: P.select(), status: 400 }, estWCError, leveBadRequestError)\n .with({ body: P.select(), status: 401 }, estWCError, leveUnauthorizedError)\n .with({ body: P.select(), status: 404 }, estWCError, leveNotFoundError)\n // Réponse OK (201)\n .with(P._, corpsOkInconnu => parse<S>(schemaReponse, corpsOkInconnu))\n // Réponses inconnues\n .otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>));\n"],"names":["match","P","pipe"],"mappings":";;;;;;;AAwBa,MAAA,cAAc,CAAC,SAC1B;AAAA,EACE,KAAK;AAAA,EACL;AAAA,IACE,MAAM,KAAK;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,CAAC,eAAe,GAAG,KAAK;AAAA,IAC1B;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,QAAQ,YAAY,QAAQ,GAAI;AAAA,EAClC;AACF;AAEW,MAAA,uCAAuC,CAClD,cACA,kBAEAA,EAAM,YAAY,EAEf,KAAK,EAAE,MAAMC,EAAE,OAAO,GAAG,QAAQ,IAAO,GAAA,YAAY,mBAAmB,EACvE,KAAK,EAAE,MAAMA,EAAE,UAAU,QAAQ,IAAA,GAAO,YAAY,qBAAqB,EACzE,KAAK,EAAE,MAAMA,EAAE,OAAA,GAAU,QAAQ,IAAI,GAAG,YAAY,iBAAiB,EAErE,KAAKA,EAAE,GAAG,CAAkB,mBAAA,MAAS,eAAe,cAAc,CAAC,EAEnE,UAAU,CAAA,MAAKC,EAAK,GAAG,gBAAgB,UAAwB,CAAC;"}
|
||||
|
|
@ -5,9 +5,9 @@ import { r as recupereElementOuLeve } from "./dom2.js";
|
|||
import { v as valideMessageMajBoutonPanier } from "./messages.js";
|
||||
import { r as recupereElementDocumentEither } from "./utils.js";
|
||||
import "./erreurs.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
import "./index.DD7qm8S6.js";
|
||||
import "./index.CCa5Y_L9.js";
|
||||
import "./messages2.js";
|
||||
import "./cart.js";
|
||||
import "./cart2.js";
|
||||
|
|
|
|||
|
|
@ -1,24 +1,29 @@
|
|||
import { r } from "./chunk-RU7WR4KH.D5j7HXCF.js";
|
||||
import { a as recupereElementsDocumentEither, r as recupereElementDocumentEither, p, b as propEither } from "./utils.js";
|
||||
import { u, a as recupereElementsDocumentEither, r as recupereElementDocumentEither, p, b as propEither } from "./utils.js";
|
||||
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import { p as parse } from "./index.DD7qm8S6.js";
|
||||
import { R as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER } from "./api2.js";
|
||||
import { a as SELECTEUR_ENTREES_PANIER, b as SELECTEUR_CONTENEUR_PANIER, c as SELECTEUR_SOUS_TOTAL_PANIER, d as SELECTEUR_TOTAL_PANIER, e as SELECTEUR_BOUTON_SEPARATION_ADRESSES, f as SELECTEUR_FORMULAIRE_LIVRAISON, g as SELECTEUR_FORMULAIRE_FACTURATION, h as ATTRIBUT_CLE_PANIER, i as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, j as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, k as SELECTEUR_BOUTON_ADDITION_QUANTITE, l as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, m as SELECTEUR_PRIX_LIGNE_PANIER, n as ATTRIBUT_HIDDEN, o as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { p as parse } from "./index.CCa5Y_L9.js";
|
||||
import { R as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER, c as ROUTE_API_MAJ_CLIENT } from "./api.js";
|
||||
import { a as SELECTEUR_ENTREES_PANIER, b as SELECTEUR_CONTENEUR_PANIER, c as SELECTEUR_SOUS_TOTAL_PANIER, d as SELECTEUR_TOTAL_PANIER, e as SELECTEUR_BOUTON_SEPARATION_ADRESSES, f as SELECTEUR_FORMULAIRE_PANIER, g as SELECTEUR_FORMULAIRE_LIVRAISON, h as SELECTEUR_FORMULAIRE_FACTURATION, i as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, j as ATTRIBUT_CLE_PANIER, k as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, l as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, m as SELECTEUR_BOUTON_ADDITION_QUANTITE, n as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, o as SELECTEUR_PRIX_LIGNE_PANIER, p as ATTRIBUT_HIDDEN, q as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js";
|
||||
import { r as recupereElementOuLeve, a as recupereElementAvecSelecteur } from "./dom2.js";
|
||||
import { r as recupereElementOuLeve, a as recupereElementsAvecSelecteur, b as recupereElementAvecSelecteur } from "./dom2.js";
|
||||
import { l as leveServerError, r as reporteErreur } from "./erreurs.js";
|
||||
import { e as estReponse500, a as estError } from "./gardes.js";
|
||||
import { v as valideMessageMajBoutonPanier, a as valideMessageMajContenuPanier, e as emetMessageMajBoutonPanier, b as emetMessageMajContenuPanier } from "./messages.js";
|
||||
import { p as postBackend, t as traiteReponseBackendWCSelonCodesHTTP } from "./reseau.js";
|
||||
import { W as WCStoreCartRemoveItemArgsSchema } from "./cart-remove-item.js";
|
||||
import { W as WCStoreCartUpdateItemArgsSchema } from "./cart-update-item.js";
|
||||
import { W as WCStoreCartSchema } from "./cart.js";
|
||||
import { W as WCStoreCartRemoveItemArgsSchema } from "./cart-remove-item.js";
|
||||
import { W as WCStoreCartUpdateCustomerArgsSchema } from "./cart-update-customer.js";
|
||||
import { W as WCStoreCartUpdateItemArgsSchema } from "./cart-update-item.js";
|
||||
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
import "./messages2.js";
|
||||
import "./index.CeK6pfoJ.js";
|
||||
import "./erreurs2.js";
|
||||
import "./cart2.js";
|
||||
import "./adresses.js";
|
||||
function n(...r2) {
|
||||
return u(Object.fromEntries, r2);
|
||||
}
|
||||
const ETATS_PAGE = _etats;
|
||||
const ENTREES_PANIER_EITHER = recupereElementsDocumentEither(
|
||||
SELECTEUR_ENTREES_PANIER
|
||||
|
|
@ -39,6 +44,10 @@ const BOUTON_SEPARATION_ADRESSES = x(
|
|||
recupereElementDocumentEither(SELECTEUR_BOUTON_SEPARATION_ADRESSES),
|
||||
recupereElementOuLeve
|
||||
);
|
||||
const FORMULAIRE_PANIER = x(
|
||||
recupereElementDocumentEither(SELECTEUR_FORMULAIRE_PANIER),
|
||||
recupereElementOuLeve
|
||||
);
|
||||
x(
|
||||
recupereElementDocumentEither(SELECTEUR_FORMULAIRE_LIVRAISON),
|
||||
recupereElementOuLeve
|
||||
|
|
@ -47,6 +56,10 @@ const FORMULAIRE_FACTURATION = x(
|
|||
recupereElementDocumentEither(SELECTEUR_FORMULAIRE_FACTURATION),
|
||||
recupereElementOuLeve
|
||||
);
|
||||
const BOUTON_ACTIONS_FORMULAIRE = x(
|
||||
recupereElementDocumentEither(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE),
|
||||
recupereElementOuLeve
|
||||
);
|
||||
const recupereElementDansEntreePanierOuLeve = (entree) => (selecteur) => x(
|
||||
recupereElementAvecSelecteur(entree)(selecteur),
|
||||
recupereElementOuLeve
|
||||
|
|
@ -251,7 +264,72 @@ const initialiseMajContenuPanier = () => {
|
|||
};
|
||||
const initialiseMajFormulairesPanier = () => {
|
||||
BOUTON_SEPARATION_ADRESSES.addEventListener("click", () => {
|
||||
BOUTON_SEPARATION_ADRESSES.checked ? FORMULAIRE_FACTURATION.removeAttribute(ATTRIBUT_HIDDEN) : FORMULAIRE_FACTURATION.setAttribute(ATTRIBUT_HIDDEN, "");
|
||||
Maybe.fromFalsy(BOUTON_SEPARATION_ADRESSES.checked).ifJust(() => {
|
||||
FORMULAIRE_FACTURATION.removeAttribute(ATTRIBUT_HIDDEN);
|
||||
recupereElementsAvecSelecteur(FORMULAIRE_FACTURATION)("input, select").ifRight((champs) => champs.forEach((champ) => champ.removeAttribute(ATTRIBUT_DESACTIVE)));
|
||||
}).ifNothing(() => {
|
||||
FORMULAIRE_FACTURATION.setAttribute(ATTRIBUT_HIDDEN, "");
|
||||
recupereElementsAvecSelecteur(FORMULAIRE_FACTURATION)("input, select").ifRight(
|
||||
(champs) => champs.forEach((champ) => {
|
||||
console.debug(champ);
|
||||
champ.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
champ.value = "";
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
const initialiseBoutonActions = () => {
|
||||
BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement) => {
|
||||
Maybe.fromFalsy(FORMULAIRE_PANIER.checkValidity()).ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
FORMULAIRE_PANIER.removeAttribute(ATTRIBUT_HIDDEN);
|
||||
BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
}).ifJust(() => {
|
||||
const donneesFormulaireLivraison = x(
|
||||
new FormData(FORMULAIRE_PANIER),
|
||||
(formData) => formData.entries(),
|
||||
Array.from,
|
||||
n
|
||||
);
|
||||
const argumentsFormulaire = {
|
||||
shipping_address: {
|
||||
address_1: donneesFormulaireLivraison["livraison-adresse"] ?? "",
|
||||
address_2: "",
|
||||
city: donneesFormulaireLivraison["livraison-ville"] ?? "",
|
||||
company: "",
|
||||
country: "FR",
|
||||
first_name: donneesFormulaireLivraison["livraison-prenom"] ?? "",
|
||||
last_name: donneesFormulaireLivraison["livraison-nom"] ?? "",
|
||||
phone: donneesFormulaireLivraison["livraison-telephone"] ?? "",
|
||||
postcode: donneesFormulaireLivraison["livraison-code-postal"] ?? "",
|
||||
state: donneesFormulaireLivraison["livraison-region-etat"] ?? ""
|
||||
}
|
||||
};
|
||||
Either.encase(
|
||||
() => parse(WCStoreCartUpdateCustomerArgsSchema, argumentsFormulaire)
|
||||
).map(
|
||||
async (args) => {
|
||||
await postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT
|
||||
}).then(async (reponse) => {
|
||||
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||
x(
|
||||
// Récupère la Réponse
|
||||
await reponse.json(),
|
||||
r((a) => console.debug(a)),
|
||||
// Traite tous les codes HTTPs possibles
|
||||
(corpsReponse) => traiteReponseBackendWCSelonCodesHTTP(
|
||||
corpsReponse,
|
||||
WCStoreCartSchema
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
).ifLeft((a) => console.error(a.issues));
|
||||
});
|
||||
});
|
||||
};
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
|
@ -259,5 +337,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
initialiseMajConteneurPanier();
|
||||
initialiseMajContenuPanier();
|
||||
initialiseMajFormulairesPanier();
|
||||
initialiseBoutonActions();
|
||||
});
|
||||
//# sourceMappingURL=scripts-page-panier.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2,18 +2,18 @@ import { r } from "./chunk-RU7WR4KH.D5j7HXCF.js";
|
|||
import { r as recupereElementDocumentEither, a as recupereElementsDocumentEither, p } from "./utils.js";
|
||||
import { x } from "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { p as parse } from "./index.DD7qm8S6.js";
|
||||
import { c as ROUTE_API_AJOUTE_ARTICLE_PANIER, d as ENTETE_WC_NONCE } from "./api2.js";
|
||||
import { p as SELECTEUR_BOUTON_AJOUT_PANIER, q as SELECTEUR_SELECTEUR_QUANTITE, r as SELECTEUR_LIENS_ONGLETS, s as SELECTEUR_SECTIONS_CONTENUS, t as ATTRIBUT_ARIA_SELECTED, n as ATTRIBUT_HIDDEN, o as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { r as recupereElementOuLeve, b as recupereElementsOuLeve } from "./dom2.js";
|
||||
import { p as parse } from "./index.CCa5Y_L9.js";
|
||||
import { d as ROUTE_API_AJOUTE_ARTICLE_PANIER, e as ENTETE_WC_NONCE } from "./api.js";
|
||||
import { r as SELECTEUR_BOUTON_AJOUT_PANIER, s as SELECTEUR_SELECTEUR_QUANTITE, t as SELECTEUR_LIENS_ONGLETS, u as SELECTEUR_SECTIONS_CONTENUS, v as ATTRIBUT_ARIA_SELECTED, p as ATTRIBUT_HIDDEN, q as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { r as recupereElementOuLeve, c as recupereElementsOuLeve } from "./dom2.js";
|
||||
import { l as leveServerError, a as leveBadRequestError, b as leveUnauthorizedError, c as leveNotFoundError, E as ErreurInconnue, d as leveErreur, r as reporteErreur } from "./erreurs.js";
|
||||
import { b as estHTMLSelectElement, e as estReponse500, a as estError } from "./gardes.js";
|
||||
import { e as emetMessageMajBoutonPanier } from "./messages.js";
|
||||
import { p as parseWCStoreCartAddItemArgs } from "./cart-add-item.js";
|
||||
import { W as WCStoreCartSchema } from "./cart.js";
|
||||
import { p as parseWCStoreCartAddItemArgs } from "./cart-add-item.js";
|
||||
import { e as estWCError } from "./erreurs2.js";
|
||||
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
import "./messages3.js";
|
||||
import "./messages2.js";
|
||||
import "./cart2.js";
|
||||
|
|
@ -82,7 +82,7 @@ const ajouteProduitAuPanier = () => {
|
|||
body: JSON.stringify(args),
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: ETATS_PAGE.nonce
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +1,8 @@
|
|||
import { c as recupereElementsAvecSelecteur, a as recupereElementAvecSelecteur } from "./dom2.js";
|
||||
import { a as recupereElementsAvecSelecteur, b as recupereElementAvecSelecteur } from "./dom2.js";
|
||||
import { C as CleNonTrouveError } from "./erreurs.js";
|
||||
import { M as Maybe } from "./Either.wHNxn7Os.js";
|
||||
import "./chunk-7BKSRZNG.C39W3Wne.js";
|
||||
import "./exports.DNZBdkMD.js";
|
||||
import "./exports.D-K_zMCo.js";
|
||||
function u$1(t2, n, a) {
|
||||
let o = (r) => t2(r, ...n);
|
||||
return a === void 0 ? o : Object.assign(o, { lazy: a, lazyArgs: n });
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"utils.js","sources":["../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-K26VP6CL.js","../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-RAAYCPUM.js","../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-VROY5Y5B.js","../../src/scripts/lib/utils.ts"],"sourcesContent":["function u(t,n,a){let o=r=>t(r,...n);return a===void 0?o:Object.assign(o,{lazy:a,lazyArgs:n})}export{u as a};\n","import{a as t}from\"./chunk-K26VP6CL.js\";function u(r,n,a){let o=r.length-n.length;if(o===0)return r(...n);if(o===1)return t(r,n,a);throw new Error(\"Wrong number of arguments\")}export{u as a};\n","import{a as n}from\"./chunk-RAAYCPUM.js\";function p(...o){return n(t,o)}var t=(o,e)=>o[e];export{p as a,t as b};\n","import { type Either, Maybe } from \"purify-ts\";\nimport { prop } from \"remeda\";\n\nimport { recupereElementAvecSelecteur, recupereElementsAvecSelecteur } from \"./dom.ts\";\nimport { CleNonTrouveError } from \"./erreurs.ts\";\n\nexport const recupereElementsDocumentEither: <E extends Element = Element>(\n selecteur: string,\n) => Either<SyntaxError, Array<E>> = recupereElementsAvecSelecteur(document);\n\nexport const recupereElementDocumentEither: <E extends Element = Element>(selecteur: string) => Either<SyntaxError, E> =\n recupereElementAvecSelecteur(document);\n\nexport const propEither = <T, K extends keyof T>(cle: K) => (donnees: T): Either<CleNonTrouveError, T[K]> =>\n Maybe\n .fromNullable(prop(donnees, cle))\n .toEither(\n new CleNonTrouveError(`La clé « ${String(cle)} » n'a pas été trouvé dans l'objet.`, { objet: donnees }),\n );\n"],"names":["u","t","n","prop"],"mappings":";;;;;AAAA,SAASA,IAAEC,IAAE,GAAE,GAAE;AAAC,MAAI,IAAE,OAAGA,GAAE,GAAE,GAAG,CAAC;AAAE,SAAO,MAAI,SAAO,IAAE,OAAO,OAAO,GAAE,EAAC,MAAK,GAAE,UAAS,EAAC,CAAC;AAAC;ACArD,SAAS,EAAE,GAAE,GAAE,GAAE;AAAC,MAAI,IAAE,EAAE,SAAO,EAAE;AAAO,MAAG,MAAI,EAAE,QAAO,EAAE,GAAG,CAAC;AAAE,MAAG,MAAI,EAAE,QAAOA,IAAE,GAAE,GAAE,CAAC;AAAE,QAAM,IAAI,MAAM,2BAA2B;AAAC;ACAvI,SAAS,KAAK,GAAE;AAAC,SAAOC,EAAE,GAAE,CAAC;AAAC;AAAC,IAAI,IAAE,CAAC,GAAE,MAAI,EAAE,CAAC;ACM1E,MAAA,iCAEwB,8BAA8B,QAAQ;AAE9D,MAAA,gCACX,6BAA6B,QAAQ;AAE1B,MAAA,aAAa,CAAuB,QAAW,CAAC,YAC3D,MACG,aAAaC,EAAK,SAAS,GAAG,CAAC,EAC/B;AAAA,EACC,IAAI,kBAAkB,YAAY,OAAO,GAAG,CAAC,uCAAuC,EAAE,OAAO,SAAS;AACxG;","x_google_ignoreList":[0,1,2]}
|
||||
{"version":3,"file":"utils.js","sources":["../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-K26VP6CL.js","../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-RAAYCPUM.js","../../../../../../node_modules/.pnpm/remeda@2.15.0/node_modules/remeda/dist/chunk-VROY5Y5B.js","../../src/scripts/lib/utils.ts"],"sourcesContent":["function u(t,n,a){let o=r=>t(r,...n);return a===void 0?o:Object.assign(o,{lazy:a,lazyArgs:n})}export{u as a};\n","import{a as t}from\"./chunk-K26VP6CL.js\";function u(r,n,a){let o=r.length-n.length;if(o===0)return r(...n);if(o===1)return t(r,n,a);throw new Error(\"Wrong number of arguments\")}export{u as a};\n","import{a as n}from\"./chunk-RAAYCPUM.js\";function p(...o){return n(t,o)}var t=(o,e)=>o[e];export{p as a,t as b};\n","import { type Either, Maybe } from \"purify-ts\";\nimport { prop } from \"remeda\";\n\nimport { recupereElementAvecSelecteur, recupereElementsAvecSelecteur } from \"./dom.ts\";\nimport { CleNonTrouveError } from \"./erreurs.ts\";\n\nexport const recupereElementsDocumentEither: <E extends Element = Element>(\n selecteur: string,\n) => Either<SyntaxError, Array<E>> = recupereElementsAvecSelecteur(document);\n\nexport const recupereElementDocumentEither: <E extends Element = Element>(\n selecteur: string,\n) => Either<SyntaxError, E> = recupereElementAvecSelecteur(document);\n\nexport const propEither = <T, K extends keyof T>(cle: K) => (donnees: T): Either<CleNonTrouveError, T[K]> =>\n Maybe\n .fromNullable(prop(donnees, cle))\n .toEither(\n new CleNonTrouveError(`La clé « ${String(cle)} » n'a pas été trouvé dans l'objet.`, { objet: donnees }),\n );\n"],"names":["u","t","n","prop"],"mappings":";;;;;AAAA,SAASA,IAAEC,IAAE,GAAE,GAAE;AAAC,MAAI,IAAE,OAAGA,GAAE,GAAE,GAAG,CAAC;AAAE,SAAO,MAAI,SAAO,IAAE,OAAO,OAAO,GAAE,EAAC,MAAK,GAAE,UAAS,EAAC,CAAC;AAAC;ACArD,SAAS,EAAE,GAAE,GAAE,GAAE;AAAC,MAAI,IAAE,EAAE,SAAO,EAAE;AAAO,MAAG,MAAI,EAAE,QAAO,EAAE,GAAG,CAAC;AAAE,MAAG,MAAI,EAAE,QAAOA,IAAE,GAAE,GAAE,CAAC;AAAE,QAAM,IAAI,MAAM,2BAA2B;AAAC;ACAvI,SAAS,KAAK,GAAE;AAAC,SAAOC,EAAE,GAAE,CAAC;AAAC;AAAC,IAAI,IAAE,CAAC,GAAE,MAAI,EAAE,CAAC;ACM1E,MAAA,iCAEwB,8BAA8B,QAAQ;AAE9D,MAAA,gCAEiB,6BAA6B,QAAQ;AAEtD,MAAA,aAAa,CAAuB,QAAW,CAAC,YAC3D,MACG,aAAaC,EAAK,SAAS,GAAG,CAAC,EAC/B;AAAA,EACC,IAAI,kBAAkB,YAAY,OAAO,GAAG,CAAC,uCAAuC,EAAE,OAAO,SAAS;AACxG;","x_google_ignoreList":[0,1,2]}
|
||||
|
|
@ -18,7 +18,7 @@ $modeles = ["produit.twig"];
|
|||
$produit = recupere_informations_produit_page_produit(wc_get_product());
|
||||
$valeurs_attribut_tailles = pipe(
|
||||
wc_get_product(),
|
||||
fn($produit) => $produit->get_attribute("pa_sizes"),
|
||||
fn($produit) => $produit->get_attribute("pa_size"),
|
||||
fn($string) => explode(",", $string),
|
||||
);
|
||||
$produits_meme_collection = array_map(
|
||||
|
|
|
|||
|
|
@ -10,21 +10,31 @@ function desactive_wpautop(): void {
|
|||
remove_filter("the_content", "wpautop");
|
||||
}
|
||||
|
||||
// Désactive divers transformations du contenu par TinyMCE
|
||||
function desactive_transformation_contenu_tinymce($init): mixed {
|
||||
/**
|
||||
* Désactive divers transformations du contenu par TinyMCE
|
||||
*
|
||||
* @param array<string, boolean> $configuration Un tableau associatif de la configuration TinyMCE.
|
||||
* @return array<string, boolean> Le même tableau avec des configurations en plus.
|
||||
*/
|
||||
function desactive_transformation_contenu_tinymce(array $configuration): array {
|
||||
// Ne supprime pas les retours à la ligne
|
||||
$init["remove_linebreaks"] = false;
|
||||
$configuration["remove_linebreaks"] = false;
|
||||
// Convertis les caractères de retours à la ligne en <br>
|
||||
$init["convert_newlines_to_brs"] = true;
|
||||
$configuration["convert_newlines_to_brs"] = true;
|
||||
// Supprime les <br> redondants
|
||||
$init["remove_redundant_brs"] = false;
|
||||
$configuration["remove_redundant_brs"] = false;
|
||||
|
||||
// Retourne $init à WordPress
|
||||
return $init;
|
||||
// Retourne $configuration à WordPress
|
||||
return $configuration;
|
||||
}
|
||||
|
||||
// Autorise l'import de SVG dans la médiathèque
|
||||
function autorise_import_svg_mediatheque($file_types) {
|
||||
/**
|
||||
* Autorise les imports en SVG dans la médiathèque.
|
||||
*
|
||||
* @param array<string, string> $file_types Un tableau des types de fichiers autorisés dans la médiathèque.
|
||||
* @return array<string, string> Le même tableau avec SVG en plus.
|
||||
*/
|
||||
function autorise_import_svg_mediatheque(array $file_types): array {
|
||||
$new_filetypes = [];
|
||||
$new_filetypes["svg"] = "image/svg+xml";
|
||||
$file_types = array_merge($file_types, $new_filetypes);
|
||||
|
|
@ -36,6 +46,10 @@ function retire_motifs_blocs_gutenberg(): void {
|
|||
remove_theme_support("core-block-patterns");
|
||||
}
|
||||
|
||||
// Désactive les appels à l'API de la mise à jour des traductions
|
||||
add_filter("async_update_translation", "__return_false");
|
||||
add_filter("auto_update_translation", "__return_false");
|
||||
|
||||
add_action("init", "desactive_wpautop");
|
||||
add_filter("tiny_mce_before_init", "desactive_transformation_contenu_tinymce");
|
||||
add_filter("upload_mimes", "autorise_import_svg_mediatheque");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
:root {
|
||||
/* Couleurs */
|
||||
--couleur-blanc: #fff;
|
||||
--couleur-blanc: #ffffff;
|
||||
--couleur-gris: #eceaeb;
|
||||
--couleur-bordeaux: #490918;
|
||||
--couleur-jaune: #ebffb8;
|
||||
|
|
@ -12,6 +12,16 @@
|
|||
--police-lato: "Lato", sans-serif;
|
||||
--police-myriad: "Myriad", sans-serif;
|
||||
|
||||
/* Hauteurs de ligne */
|
||||
--hauteur-ligne-classique: 1.5;
|
||||
--hauteur-ligne-rapprochee: 1;
|
||||
|
||||
/* Espacements entre les lettres */
|
||||
--espacement-inter-lettres-etendu-s: 0.5px;
|
||||
--espacement-inter-lettres-etendu-m: 1px;
|
||||
--espacement-inter-lettres-etendu-l: 1.5px;
|
||||
--espacement-inter-lettres-etendu-xl: 2px;
|
||||
|
||||
/* Dimensions */
|
||||
--en-tete-hauteur: 60px;
|
||||
--menu-categories-produits-hauteur: 54.39px;
|
||||
|
|
|
|||
|
|
@ -2,23 +2,21 @@
|
|||
|
||||
@use "../abstracts/variables" as variables;
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Utilise un meilleur modèle de boîte.
|
||||
*/
|
||||
html {
|
||||
box-sizing: border-box; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Réinitialise avec des styles par défaut plus simples.
|
||||
*
|
||||
* 1. Hérite du modèle de boîte du document par défaut.
|
||||
* 2. Pas de marges par défaut.
|
||||
* 3. Hérite par défaut des styles de texte et de couleur.
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
*, *::before, *::after {
|
||||
box-sizing: inherit; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
padding: 0; /* 2 */
|
||||
|
|
@ -26,7 +24,7 @@ html {
|
|||
color: inherit; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Utilise une couleur d'arrière-plan définie.
|
||||
* 2. Utilise la couleur primaire du site.
|
||||
*/
|
||||
|
|
@ -35,24 +33,26 @@ body {
|
|||
background: var(--couleur-gris); /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Force l'héritage des styles pour ces éléments.
|
||||
*/
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
button, input, select, textarea {
|
||||
font: inherit; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Change la couleur d'arrière-plan à la sélection du texte.
|
||||
*/
|
||||
*::selection {
|
||||
background: var(--couleur-jaune);
|
||||
}
|
||||
|
||||
/**
|
||||
/* Désaffiche tout élément avec l'attribut hidden */
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* *
|
||||
* Désactive les animations pour les Utilisateurs n'en souhaitant pas.
|
||||
*/
|
||||
@media (prefers-reduced-motion) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles typographiques de base
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 2. Rendu spécifique du texte pour Safari/iOS.
|
||||
* 3. Rendu plus précis du texte.
|
||||
*/
|
||||
|
|
@ -11,15 +11,23 @@ html {
|
|||
}
|
||||
|
||||
body {
|
||||
font: 1rem/1.4 Lato;
|
||||
font: 1rem/var(--hauteur-ligne-classique) Lato;
|
||||
font-optical-sizing: auto;
|
||||
font-kerning: normal;
|
||||
font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures contextual;
|
||||
font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures
|
||||
contextual;
|
||||
color: var(--couleur-noir);
|
||||
text-decoration-skip-ink: auto;
|
||||
letter-spacing: 0.5px;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Mixins Sass */
|
||||
// TODO: Créer une mixin pour le style "gris avec lettres espacées"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
// Styles pour les boutons (<button>, <a> avec rôle de boutons)
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Réinitialisation des styles des <button>.
|
||||
*/
|
||||
button {
|
||||
all: initial;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
letter-spacing: inherit;
|
||||
|
||||
&.bouton-case-pleine {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,18 @@ input, select, textarea {
|
|||
background: var(--couleur-jaune);
|
||||
outline: 1px solid var(--couleur-noir);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px 0.5px
|
||||
/ 2px 2px;
|
||||
}
|
||||
}
|
||||
|
||||
input:is([type="email"], [type="text"], [type="tel"]), textarea {
|
||||
&::placeholder {
|
||||
text-transform: lowercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
|
||||
&::selection {
|
||||
|
|
@ -61,7 +68,7 @@ input[type="checkbox"], input[type="radio"] {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Pour un alignement parfait du label avec la case à cocher.
|
||||
*/
|
||||
label:has(~ &), + label {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
// Styles de base pour les images (<img>, <picture>).
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Facilite l'usages des images.
|
||||
* 2. Affiche les images dans l'intégralité de leur conteneur, en contrepartie d'un recoupage.
|
||||
* 3. Arrière-plan jaune en attendant le chargement de l'image.
|
||||
*/
|
||||
img,
|
||||
picture {
|
||||
img, picture {
|
||||
display: block; /* 1 */
|
||||
max-width: 100%; /* 2 */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles de base pour les liens (<a>).
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Change la « bordure » de base.
|
||||
* 2. Ajoute un contour, qui sera colorisé au focus.
|
||||
* 3. Anime le changement de couleur des texte, bordure et contour.
|
||||
|
|
@ -25,12 +25,11 @@ a {
|
|||
text-decoration-skip: edges; /* 1 */
|
||||
|
||||
/* Change les couleurs de l'arrière-plan et du contour pour marquer le focus. */
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
&:focus, &:focus-visible {
|
||||
outline-color: var(--lien-contour-couleur-focus);
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Lien ressemblant visuellement à un bouton.
|
||||
*/
|
||||
&.lien-bouton {
|
||||
|
|
@ -45,8 +44,7 @@ a {
|
|||
border: 1px solid var(--couleur-noir);
|
||||
|
||||
/* Change la couleur de l'arrière-plan pour marquer le focus. */
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
&:focus, &:focus-visible {
|
||||
background: var(--lien-bouton-arriere-plan-couleur-survol);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles de base pour les lists (<ul>, <ol>, <li>)
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Réinitialise les styles des listes non ordonnées.
|
||||
*
|
||||
* 1. Pas de puce.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
ul {
|
||||
list-style: none; /* 1 */
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Utilise un SVG comme puce de liste via l'emploi d'un arrière-plan.
|
||||
*
|
||||
* 1. Ajoute de la marge interne pour que la puce ait de la place.
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -14,8 +16,10 @@
|
|||
font-style: italic;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-100italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -24,8 +28,10 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -34,8 +40,10 @@
|
|||
font-style: italic;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-300italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -44,8 +52,10 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-regular.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-regular.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-regular.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-regular.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -54,8 +64,10 @@
|
|||
font-style: italic;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -64,8 +76,10 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -74,8 +88,10 @@
|
|||
font-style: italic;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-700italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -84,8 +100,10 @@
|
|||
font-style: normal;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -94,6 +112,8 @@
|
|||
font-style: italic;
|
||||
font-display: swap;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/lato/lato-v24-latin-900italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
font-stretch: 70% 110%;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -16,6 +17,8 @@
|
|||
font-display: swap;
|
||||
font-stretch: 70% 110%;
|
||||
src:
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable-italic.woff2") format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable-italic.ttf") format("truetype");
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable-italic.woff2")
|
||||
format("woff2"),
|
||||
url("/app/themes/haiku-atelier-2024/assets/fonts/myriad/myriad-variable-italic.ttf")
|
||||
format("truetype");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour les colonnes de photos d'une Page Produit
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Les photos du Produit, étalées sur 2 colonnes : une pour la photo Produit, une pour les photos
|
||||
* portées.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@
|
|||
.logo {
|
||||
width: var(--en-tete-logo-longueur);
|
||||
|
||||
picture,
|
||||
img {
|
||||
picture, img {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +47,7 @@
|
|||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Le conteneur d'une entrée du menu, nécessaire pour que le changement d'arrière-plan au
|
||||
* survol soit possible.
|
||||
*
|
||||
|
|
@ -68,17 +67,20 @@
|
|||
|
||||
a {
|
||||
display: inline-block; /* 1 */
|
||||
padding: var(--nav-entree-marges-internes-bloc) var(--nav-entree-marges-internes-ligne); /* 2 */
|
||||
padding: var(--nav-entree-marges-internes-bloc)
|
||||
var(--nav-entree-marges-internes-ligne); /* 2 */
|
||||
text-align: center; /* 4 */
|
||||
}
|
||||
|
||||
&--courante {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90% no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90%
|
||||
no-repeat;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90% no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto
|
||||
90% no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,7 +93,7 @@
|
|||
place-items: center;
|
||||
text-align: center;
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Permet d'éviter un agrandissement de l'élément avec plus de 9 articles.
|
||||
*/
|
||||
a {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour la grille de Produits du Shop
|
||||
|
||||
/**
|
||||
/* *
|
||||
* La Grille des Produits sous forme de Cartes.
|
||||
*
|
||||
* Les Cartes ont une taille minimale et occupent l'espace en ligne disponible jusqu'à l'occuper
|
||||
|
|
@ -86,7 +86,9 @@
|
|||
&__aucun-produit {
|
||||
grid-column: span 3;
|
||||
align-content: center;
|
||||
min-height: calc(100vh - var(--menu-categories-produits-hauteur) - var(--en-tete-hauteur) - 105px);
|
||||
min-height: calc(
|
||||
100vh - var(--menu-categories-produits-hauteur) - var(--en-tete-hauteur) - 105px
|
||||
);
|
||||
text-align: center;
|
||||
|
||||
p + p {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour la boîte flottante des Informations sur le Produit
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Boîte flottante avec les informations Produit, le sélecteur de variation et de quantité pour le
|
||||
* Panier.
|
||||
*
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
max-width: var(--boite-longueur);
|
||||
border: 1px solid var(--couleur-noir);
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Définis les apparence et comportement de toutes les sections de la boîte.
|
||||
*/
|
||||
> section {
|
||||
|
|
@ -60,10 +60,6 @@
|
|||
padding: var(--section-marges-internes);
|
||||
font-weight: 350;
|
||||
|
||||
&[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc;
|
||||
list-style-position: inside;
|
||||
|
|
@ -130,12 +126,12 @@
|
|||
.selecteur-produit {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
column-gap: 2rem;
|
||||
column-gap: var(--espace-xl);
|
||||
place-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
line-height: 1;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
|
||||
&__nom {
|
||||
letter-spacing: 1px;
|
||||
|
|
@ -197,7 +193,7 @@
|
|||
select {
|
||||
position: relative;
|
||||
min-width: 4rem;
|
||||
padding: 0.5rem 2rem;
|
||||
padding: 0.5rem var(--espace-xl);
|
||||
text-align: center;
|
||||
appearance: none;
|
||||
background: rgb(236 234 235 / 90%);
|
||||
|
|
@ -221,7 +217,7 @@
|
|||
// left: 0;
|
||||
// display: none;
|
||||
// min-width: 3rem;
|
||||
// min-height: 2rem;
|
||||
// min-height: var(--espace-xl);
|
||||
// background-color: red;
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour le menu des Catégories de Produits
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Le menu avec les Catégories de Produits pour une navigation rapide.
|
||||
*
|
||||
* 1. Applique une marge supérieure égale à la hauteur de l'en-tête pour qu'elle puisse s'afficher
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
height: var(--menu-section-hauteur);
|
||||
margin-top: var(--menu-section-marges-bloc-debut); /* 1 */
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Liste des Catégories de Produits.
|
||||
*
|
||||
* 1. Toutes les entrées font la même longueur, en respectant une contrainte de longueur
|
||||
|
|
@ -27,10 +27,11 @@
|
|||
*/
|
||||
ul {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(var(--menu-entree-longueur-minimale), 1fr)); /* 1 */
|
||||
grid-template-columns:
|
||||
repeat(auto-fit, minmax(var(--menu-entree-longueur-minimale), 1fr)); /* 1 */
|
||||
place-items: center;
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Force chaque entrée à occuper tout l'espace alloué par grid.
|
||||
*/
|
||||
li {
|
||||
|
|
@ -53,7 +54,7 @@
|
|||
font-weight: 500;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Permet de créer des marges verticales.
|
||||
* 2. Hérite de la longueur du conteneur.
|
||||
* 3. Surchargement de styles pour les liens.
|
||||
|
|
@ -66,8 +67,7 @@
|
|||
border-left: 1px solid var(--couleur-gris);
|
||||
outline: initial; /* 3 */
|
||||
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
&:focus, &:focus-visible {
|
||||
color: var(--couleur-jaune);
|
||||
outline: initial; /* 3 */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,16 +66,25 @@
|
|||
text-transform: lowercase;
|
||||
}
|
||||
}
|
||||
|
||||
.panneau__formulaires__paiement {
|
||||
.formulaire__paiement__attente-renseignement-formulaires {
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.formulaire {
|
||||
margin: auto;
|
||||
padding: 0 var(--espace-xl);
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
+ .formulaire {
|
||||
margin-top: var(--espace-xl);
|
||||
}
|
||||
|
|
@ -138,7 +147,6 @@
|
|||
font: inherit;
|
||||
color: inherit;
|
||||
text-transform: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@
|
|||
border: 1px solid var(--couleur-noir);
|
||||
|
||||
button:disabled {
|
||||
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px 0.5px / 2px 2px;
|
||||
background: repeating-conic-gradient(var(--couleur-noir) 0% 25%, transparent 0% 100%) 1px
|
||||
0.5px / 2px 2px;
|
||||
}
|
||||
|
||||
/* Bouton d'addition de quantité */
|
||||
|
|
@ -80,7 +81,7 @@
|
|||
max-width: 3rem;
|
||||
}
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Cache les flèches d'augmentation/diminution sur Firefox.
|
||||
* 2. Cache les flèches d'augmentation/diminution sur Chrome/Edge/Safari.
|
||||
*/
|
||||
|
|
@ -93,8 +94,7 @@
|
|||
border-right: 1px solid var(--couleur-noir);
|
||||
border-left: 1px solid var(--couleur-noir);
|
||||
|
||||
&::-webkit-outer-spin-button,
|
||||
&::-webkit-inner-spin-button {
|
||||
&::-webkit-outer-spin-button, &::-webkit-inner-spin-button {
|
||||
margin: 0; /* 2 */
|
||||
appearance: none; /* 2 */
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
text-align: center;
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Nécessaire pour ne pas qu'un espace vertical non souhaité apparaisse.
|
||||
* 2. Applique une marge entre les instructions et le code promo de notre choix.
|
||||
*/
|
||||
|
|
@ -228,7 +228,6 @@
|
|||
font-style: italic;
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
|
|
@ -241,6 +240,7 @@
|
|||
font-size: 0.8rem;
|
||||
font-weight: 450;
|
||||
color: grey;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour le pied de page du site
|
||||
|
||||
/**
|
||||
/* *
|
||||
* Le pied de page du site.
|
||||
*/
|
||||
#pied-de-page {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
place-items: center;
|
||||
max-width: 100vw;
|
||||
padding: var(--pied-de-page-marges-internes-bloc) var(--pied-de-page-marges-internes-ligne);
|
||||
line-height: 1.5;
|
||||
line-height: var(--hauteur-ligne-classique);
|
||||
background: var(--couleur-jaune);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
.produits-similaires {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: 1fr auto;
|
||||
grid-template-areas:
|
||||
"en-tete en-tete en-tete"
|
||||
"produits produits produits";
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: 1fr auto;
|
||||
place-items: center;
|
||||
margin-top: var(--espace-m);
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
h2 {
|
||||
font-style: italic;
|
||||
line-height: 1;
|
||||
line-height: var(--hauteur-ligne-rapprochee);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
.grille-produits-similaires {
|
||||
display: grid;
|
||||
grid-auto-rows: 1fr;
|
||||
grid-area: produits;
|
||||
grid-auto-rows: 1fr;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 1px;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
@forward "../layouts/panneau-panier";
|
||||
@forward "../layouts/panneau-informations-client";
|
||||
|
||||
/**
|
||||
/* *
|
||||
* 1. Applique une marge supérieure égale à la hauteur de l'en-tête pour qu'elle puisse s'afficher
|
||||
* correctement.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ export const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;
|
|||
export const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;
|
||||
export const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;
|
||||
export const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;
|
||||
export const ROUTE_API_MAJ_CLIENT = `/${CHEMIN_API_REST}/wc/store/cart/update-customer`;
|
||||
|
||||
// En-têtes
|
||||
export const ENTETE_WC_NONCE = "Nonce";
|
||||
|
|
|
|||
|
|
@ -24,5 +24,7 @@ export const SELECTEUR_PRIX_LIGNE_PANIER = ".detail-produit__nom-prix span";
|
|||
export const SELECTEUR_SOUS_TOTAL_PANIER = "#panneau-panier .panneau__sous-totaux__ligne strong";
|
||||
export const SELECTEUR_TOTAL_PANIER = "#panneau-panier .panneau__pied-de-page p span";
|
||||
export const SELECTEUR_BOUTON_SEPARATION_ADRESSES = "#separation-adresses";
|
||||
export const SELECTEUR_FORMULAIRE_PANIER = "#panneau-informations-client form";
|
||||
export const SELECTEUR_FORMULAIRE_LIVRAISON = "#panneau-informations-client .panneau__formulaires__livraison";
|
||||
export const SELECTEUR_FORMULAIRE_FACTURATION = "#panneau-informations-client .panneau__formulaires__facturation";
|
||||
export const SELECTEUR_BOUTON_ACTIONS_FORMULAIRE = "#panneau-informations-client .panneau__pied-de-page button";
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
import { Right } from "purify-ts";
|
||||
import wretch from "wretch";
|
||||
|
||||
import { ROUTE_API_PANIER } from "../constantes/api.ts";
|
||||
|
||||
export const get = async (
|
||||
url: string,
|
||||
input: Record<string, string>,
|
||||
) => {
|
||||
return fetch(
|
||||
`${url}?${new URLSearchParams(input).toString()}`,
|
||||
);
|
||||
};
|
||||
|
||||
export const post = async (
|
||||
url: string,
|
||||
input: Record<string, string>,
|
||||
) => {
|
||||
return fetch(url, {
|
||||
body: JSON.stringify(input),
|
||||
method: "POST",
|
||||
});
|
||||
};
|
||||
|
||||
type CreateAPIMethod = <
|
||||
Input extends Record<string, string>,
|
||||
Output,
|
||||
>(opts: {
|
||||
method: "GET" | "POST";
|
||||
url: string;
|
||||
}) => (input: Input) => Promise<Output>;
|
||||
|
||||
const createAPIMethod: CreateAPIMethod = (opts) => (input) => {
|
||||
const method = opts.method === "GET" ? get : post;
|
||||
|
||||
return (
|
||||
method(opts.url, input)
|
||||
// Imagine error handling here...
|
||||
.then((res) => res.json())
|
||||
);
|
||||
};
|
||||
const requeteRecuperationPanierUtilisateur = fetch(
|
||||
ROUTE_API_PANIER,
|
||||
{
|
||||
credentials: "same-origin",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
method: "GET",
|
||||
mode: "same-origin",
|
||||
signal: AbortSignal.timeout(5000),
|
||||
},
|
||||
).then(Right);
|
||||
|
||||
const recuperePanierUtilisateur = wretch(ROUTE_API_PANIER)
|
||||
.content("application/json")
|
||||
.options({
|
||||
credentials: "same-origin",
|
||||
mode: "same-origin",
|
||||
signal: AbortSignal.timeout(5000),
|
||||
})
|
||||
.get()
|
||||
.json()
|
||||
.catch();
|
||||
|
||||
/**
|
||||
* Récupération du Panier. Pas de paramètres, juste une requête GET.
|
||||
*/
|
||||
|
|
@ -12,7 +12,7 @@ import { creeSyntaxError, ERREUR_SELECTEUR_INEXISTANT, ERREUR_SYNTAXE_INVALIDE,
|
|||
* @throws Une Erreur si aucun Élément n'a été trouvé.
|
||||
* @returns Un Élément.
|
||||
*/
|
||||
export const safeQuerySelector: (parent: ElementParent) => (selecteur: string) => Element = (parent) => (selecteur) => {
|
||||
export const safeQuerySelector: (parent: ElementParent) => (selecteur: string) => Element = parent => selecteur => {
|
||||
const element: Element | null = parent.querySelector(selecteur);
|
||||
|
||||
if (!element) throw new DOMException(ERREUR_SELECTEUR_INEXISTANT(selecteur));
|
||||
|
|
@ -26,7 +26,7 @@ export const safeQuerySelector: (parent: ElementParent) => (selecteur: string) =
|
|||
* @returns Un tableau pouvant être vide d'Éléments.
|
||||
*/
|
||||
export const safeQuerySelectorAll: (parent: ElementParent) => (selecteur: string) => Array<Element> =
|
||||
(parent) => (selecteur) => {
|
||||
parent => selecteur => {
|
||||
const elements: Array<Element> = Array.from(parent.querySelectorAll(selecteur));
|
||||
|
||||
if (isEmpty(elements)) {
|
||||
|
|
@ -59,7 +59,7 @@ export const recupereElementsAvecSelecteur =
|
|||
* @param element
|
||||
* @returns Un booléen
|
||||
*/
|
||||
export const estDansLaVue: (element: Element) => boolean = (element) => {
|
||||
export const estDansLaVue: (element: Element) => boolean = element => {
|
||||
const rect: DOMRect = element.getBoundingClientRect();
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const requeteRecuperePanier = (): Promise<Either<Error, Response>> =>
|
|||
{
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: ETATS.nonce,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const postBackend = (args: ArgumentsPostBackendWC) =>
|
|||
body: args.corps,
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: args.nonce,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
import * as v from "valibot";
|
||||
|
||||
export const WCStoreBillingAddressSchema = v.object({
|
||||
address_1: v.string(),
|
||||
address_2: v.string(),
|
||||
city: v.string(),
|
||||
company: v.string(),
|
||||
country: v.string(),
|
||||
email: v.pipe(v.string(), v.email()),
|
||||
first_name: v.string(),
|
||||
last_name: v.string(),
|
||||
phone: v.string(),
|
||||
postcode: v.string(),
|
||||
state: v.string(),
|
||||
});
|
||||
|
||||
export const WCStoreShippingAddressSchema = v.object({
|
||||
address_1: v.string(),
|
||||
address_2: v.string(),
|
||||
city: v.string(),
|
||||
company: v.string(),
|
||||
country: v.string(),
|
||||
first_name: v.string(),
|
||||
last_name: v.string(),
|
||||
phone: v.string(),
|
||||
postcode: v.string(),
|
||||
state: v.string(),
|
||||
});
|
||||
|
|
@ -18,5 +18,5 @@ export const WCStoreCartAddItemArgsSchema = v.object({
|
|||
variation: v.optional(v.array(WCStoreCartAddItemArgsItemsSchema)),
|
||||
});
|
||||
|
||||
export const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = (args) =>
|
||||
export const parseWCStoreCartAddItemArgs: (args: unknown) => WCStoreCartAddItemArgs = args =>
|
||||
v.parse(WCStoreCartAddItemArgsSchema, args);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import * as v from "valibot";
|
||||
|
||||
import { WCStoreBillingAddressSchema, WCStoreShippingAddressSchema } from "./adresses.ts";
|
||||
|
||||
export const WCStoreCartUpdateCustomerArgsSchema = v.object({
|
||||
billing_address: v.optional(WCStoreBillingAddressSchema),
|
||||
shipping_address: v.optional(WCStoreShippingAddressSchema),
|
||||
});
|
||||
|
|
@ -3,62 +3,62 @@ import * as v from "valibot";
|
|||
import { CATALOG_VISIBILITIES } from "../../constantes/cart.ts";
|
||||
|
||||
export const WCStoreCartItemTotalsSchema = v.object({
|
||||
"currency_code": v.string(),
|
||||
"currency_decimal_separator": v.string(),
|
||||
"currency_minor_unit": v.number(),
|
||||
"currency_prefix": v.string(),
|
||||
"currency_suffix": v.string(),
|
||||
"currency_symbol": v.string(),
|
||||
"currency_thousand_separator": v.string(),
|
||||
"line_subtotal": v.string(),
|
||||
"line_subtotal_tax": v.string(),
|
||||
"line_total": v.string(),
|
||||
"line_total_tax": v.string(),
|
||||
currency_code: v.string(),
|
||||
currency_decimal_separator: v.string(),
|
||||
currency_minor_unit: v.number(),
|
||||
currency_prefix: v.string(),
|
||||
currency_suffix: v.string(),
|
||||
currency_symbol: v.string(),
|
||||
currency_thousand_separator: v.string(),
|
||||
line_subtotal: v.string(),
|
||||
line_subtotal_tax: v.string(),
|
||||
line_total: v.string(),
|
||||
line_total_tax: v.string(),
|
||||
});
|
||||
|
||||
export const WCStoreCartItemSchema = v.object({
|
||||
"backorders_allowed": v.boolean(),
|
||||
"catalog_visibility": v.enum(CATALOG_VISIBILITIES),
|
||||
"description": v.string(),
|
||||
"extensions": v.unknown(),
|
||||
"id": v.number(),
|
||||
"images": v.array(v.unknown()),
|
||||
"item_data": v.array(v.unknown()),
|
||||
"key": v.string(),
|
||||
"low_stock_remaining": v.union([v.null()]),
|
||||
"name": v.string(),
|
||||
"permalink": v.pipe(v.string(), v.url()),
|
||||
"prices": v.unknown(),
|
||||
"quantity": v.number(),
|
||||
"quantity_limits": v.unknown(),
|
||||
"short_description": v.string(),
|
||||
"show_backorder_badge": v.boolean(),
|
||||
"sku": v.string(),
|
||||
"sold_individually": v.boolean(),
|
||||
"totals": WCStoreCartItemTotalsSchema,
|
||||
"type": v.string(),
|
||||
"variation": v.array(v.unknown()),
|
||||
backorders_allowed: v.boolean(),
|
||||
catalog_visibility: v.enum(CATALOG_VISIBILITIES),
|
||||
description: v.string(),
|
||||
extensions: v.unknown(),
|
||||
id: v.number(),
|
||||
images: v.array(v.unknown()),
|
||||
item_data: v.array(v.unknown()),
|
||||
key: v.string(),
|
||||
low_stock_remaining: v.union([v.null()]),
|
||||
name: v.string(),
|
||||
permalink: v.pipe(v.string(), v.url()),
|
||||
prices: v.unknown(),
|
||||
quantity: v.number(),
|
||||
quantity_limits: v.unknown(),
|
||||
short_description: v.string(),
|
||||
show_backorder_badge: v.boolean(),
|
||||
sku: v.string(),
|
||||
sold_individually: v.boolean(),
|
||||
totals: WCStoreCartItemTotalsSchema,
|
||||
type: v.string(),
|
||||
variation: v.array(v.unknown()),
|
||||
});
|
||||
|
||||
export const WCStoreCartTotalsSchema = v.object({
|
||||
"currency_code": v.string(),
|
||||
"currency_decimal_separator": v.string(),
|
||||
"currency_minor_unit": v.number(),
|
||||
"currency_prefix": v.string(),
|
||||
"currency_suffix": v.string(),
|
||||
"currency_symbol": v.string(),
|
||||
"currency_thousand_separator": v.string(),
|
||||
"tax_lines": v.array(v.unknown()),
|
||||
"total_discount": v.string(),
|
||||
"total_discount_tax": v.string(),
|
||||
"total_fees": v.string(),
|
||||
"total_fees_tax": v.string(),
|
||||
"total_items": v.string(),
|
||||
"total_items_tax": v.string(),
|
||||
"total_price": v.string(),
|
||||
"total_shipping": v.union([v.string(), v.null()]),
|
||||
"total_shipping_tax": v.union([v.string(), v.null()]),
|
||||
"total_tax": v.string(),
|
||||
currency_code: v.string(),
|
||||
currency_decimal_separator: v.string(),
|
||||
currency_minor_unit: v.number(),
|
||||
currency_prefix: v.string(),
|
||||
currency_suffix: v.string(),
|
||||
currency_symbol: v.string(),
|
||||
currency_thousand_separator: v.string(),
|
||||
tax_lines: v.array(v.unknown()),
|
||||
total_discount: v.string(),
|
||||
total_discount_tax: v.string(),
|
||||
total_fees: v.string(),
|
||||
total_fees_tax: v.string(),
|
||||
total_items: v.string(),
|
||||
total_items_tax: v.string(),
|
||||
total_price: v.string(),
|
||||
total_shipping: v.union([v.string(), v.null()]),
|
||||
total_shipping_tax: v.union([v.string(), v.null()]),
|
||||
total_tax: v.string(),
|
||||
});
|
||||
|
||||
export const WCStoreCartSchema = v.object({
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const readMailFromCli = async (): Promise<
|
|||
return rl
|
||||
.question("Please enter your email \n")
|
||||
.then(Right)
|
||||
.catch((error) => Left({ errorReason: error.message }))
|
||||
.catch(error => Left({ errorReason: error.message }))
|
||||
.finally(() => {
|
||||
rl.close();
|
||||
});
|
||||
|
|
@ -78,16 +78,16 @@ const main = async (): Promise<void> => {
|
|||
const eitherEmail = eitherEmailFromInput.map(validateEmail); // map over the either to validate the email
|
||||
|
||||
eitherEmail.caseOf({
|
||||
Left: (error) => {
|
||||
Left: error => {
|
||||
console.log(error.errorReason);
|
||||
}, // email is invalid
|
||||
Right: async (email) => {
|
||||
Right: async email => {
|
||||
const eitherSessionId = await getSessionIdFromEmail(email);
|
||||
eitherSessionId.caseOf({
|
||||
Left: (error) => {
|
||||
Left: error => {
|
||||
console.log(error.errorReason);
|
||||
}, // getting the sessionId failed
|
||||
Right: (sessionId) => {
|
||||
Right: sessionId => {
|
||||
printInformations({ email, sessionId });
|
||||
},
|
||||
});
|
||||
|
|
@ -106,7 +106,7 @@ const flow = EitherAsync<{ errorReason: string }, void>(
|
|||
|
||||
const main2 = async () => {
|
||||
const result = await flow.run();
|
||||
result.ifLeft((error) => {
|
||||
result.ifLeft(error => {
|
||||
console.log(error.errorReason);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
6
web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/adresses.d.ts
vendored
Normal file
6
web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/adresses.d.ts
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import type { InferOutput } from "valibot";
|
||||
|
||||
import type { WCStoreBillingAddressSchema, WCStoreShippingAddressSchema } from "../../schemas/adresses.ts";
|
||||
|
||||
export type WCStoreBillingAddress = InferOutput<typeof WCStoreBillingAddressSchema>;
|
||||
export type WCStoreShippingAddress = InferOutput<typeof WCStoreShippingAddressSchema>;
|
||||
5
web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/cart-update-customer.d.ts
vendored
Normal file
5
web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/cart-update-customer.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import type { InferOutput } from "valibot";
|
||||
|
||||
import type { WCStoreCartUpdateCustomerArgsSchema } from "../../schemas/cart-update-customer.ts";
|
||||
|
||||
export type WCStoreCartUpdateCustomerArgs = InferOutput<typeof WCStoreCartUpdateCustomerArgsSchema>;
|
||||
|
|
@ -8,8 +8,9 @@ export const recupereElementsDocumentEither: <E extends Element = Element>(
|
|||
selecteur: string,
|
||||
) => Either<SyntaxError, Array<E>> = recupereElementsAvecSelecteur(document);
|
||||
|
||||
export const recupereElementDocumentEither: <E extends Element = Element>(selecteur: string) => Either<SyntaxError, E> =
|
||||
recupereElementAvecSelecteur(document);
|
||||
export const recupereElementDocumentEither: <E extends Element = Element>(
|
||||
selecteur: string,
|
||||
) => Either<SyntaxError, E> = recupereElementAvecSelecteur(document);
|
||||
|
||||
export const propEither = <T, K extends keyof T>(cle: K) => (donnees: T): Either<CleNonTrouveError, T[K]> =>
|
||||
Maybe
|
||||
|
|
|
|||
|
|
@ -1,19 +1,25 @@
|
|||
import { Either, Maybe } from "purify-ts";
|
||||
import { pipe, prop, tap } from "remeda";
|
||||
import { fromEntries, pipe, prop, tap } from "remeda";
|
||||
import { parse, type ValiError } from "valibot";
|
||||
|
||||
import type { MessageMajContenuPanierSchema } from "./lib/schemas/messages.ts";
|
||||
import type { WCStoreCart, WCStoreCartItem } from "./lib/types/api/cart";
|
||||
import type { WCStoreCartRemoveItemArgs } from "./lib/types/api/cart-remove-item";
|
||||
import type { WCStoreCartUpdateCustomerArgs } from "./lib/types/api/cart-update-customer";
|
||||
import type { WCStoreCartUpdateItemArgs } from "./lib/types/api/cart-update-item";
|
||||
import type { MessageMajBoutonPanierDonnees, MessageMajContenuPanierDonnees } from "./lib/types/messages";
|
||||
|
||||
import { ROUTE_API_MAJ_ARTICLE_PANIER, ROUTE_API_RETIRE_ARTICLE_PANIER } from "./constantes/api.ts";
|
||||
import {
|
||||
ROUTE_API_MAJ_ARTICLE_PANIER,
|
||||
ROUTE_API_MAJ_CLIENT,
|
||||
ROUTE_API_RETIRE_ARTICLE_PANIER,
|
||||
} from "./constantes/api.ts";
|
||||
import {
|
||||
ATTRIBUT_CLE_PANIER,
|
||||
ATTRIBUT_CONTIENT_ARTICLES,
|
||||
ATTRIBUT_DESACTIVE,
|
||||
ATTRIBUT_HIDDEN,
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE,
|
||||
SELECTEUR_BOUTON_ADDITION_QUANTITE,
|
||||
SELECTEUR_BOUTON_SEPARATION_ADRESSES,
|
||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE,
|
||||
|
|
@ -23,12 +29,13 @@ import {
|
|||
SELECTEUR_ENTREES_PANIER,
|
||||
SELECTEUR_FORMULAIRE_FACTURATION,
|
||||
SELECTEUR_FORMULAIRE_LIVRAISON,
|
||||
SELECTEUR_FORMULAIRE_PANIER,
|
||||
SELECTEUR_PRIX_LIGNE_PANIER,
|
||||
SELECTEUR_SOUS_TOTAL_PANIER,
|
||||
SELECTEUR_TOTAL_PANIER,
|
||||
} from "./constantes/dom.ts";
|
||||
import { NOM_CANAL_BOUTON_PANIER, NOM_CANAL_CONTENU_PANIER } from "./constantes/messages.ts";
|
||||
import { recupereElementAvecSelecteur, recupereElementOuLeve } from "./lib/dom.ts";
|
||||
import { recupereElementAvecSelecteur, recupereElementOuLeve, recupereElementsAvecSelecteur } from "./lib/dom.ts";
|
||||
import { type CleNonTrouveError, leveServerError, reporteErreur } from "./lib/erreurs.ts";
|
||||
import { estError, estReponse500 } from "./lib/gardes.ts";
|
||||
import {
|
||||
|
|
@ -38,9 +45,10 @@ import {
|
|||
valideMessageMajContenuPanier,
|
||||
} from "./lib/messages.ts";
|
||||
import { postBackend, traiteReponseBackendWCSelonCodesHTTP } from "./lib/reseau.ts";
|
||||
import { WCStoreCartRemoveItemArgsSchema } from "./lib/schemas/cart-remove-item.ts";
|
||||
import { WCStoreCartUpdateItemArgsSchema } from "./lib/schemas/cart-update-item.ts";
|
||||
import { WCStoreCartSchema } from "./lib/schemas/cart.ts";
|
||||
import { WCStoreCartRemoveItemArgsSchema } from "./lib/schemas/cart-remove-item.ts";
|
||||
import { WCStoreCartUpdateCustomerArgsSchema } from "./lib/schemas/cart-update-customer.ts";
|
||||
import { WCStoreCartUpdateItemArgsSchema } from "./lib/schemas/cart-update-item.ts";
|
||||
import { propEither, recupereElementDocumentEither, recupereElementsDocumentEither } from "./lib/utils.ts";
|
||||
|
||||
/** États utiles pour les scripts de la page. */
|
||||
|
|
@ -60,7 +68,7 @@ type ElementsEntreePanier = {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- États injectés par le modèle PHP
|
||||
const ETATS_PAGE: EtatsPage = _etats;
|
||||
|
||||
/** */
|
||||
// Éléments d'intérêt
|
||||
const ENTREES_PANIER_EITHER: Either<SyntaxError, Array<HTMLElement>> = recupereElementsDocumentEither<HTMLElement>(
|
||||
SELECTEUR_ENTREES_PANIER,
|
||||
);
|
||||
|
|
@ -80,6 +88,10 @@ const BOUTON_SEPARATION_ADRESSES: HTMLInputElement = pipe(
|
|||
recupereElementDocumentEither<HTMLInputElement>(SELECTEUR_BOUTON_SEPARATION_ADRESSES),
|
||||
recupereElementOuLeve,
|
||||
);
|
||||
const FORMULAIRE_PANIER: HTMLFormElement = pipe(
|
||||
recupereElementDocumentEither<HTMLFormElement>(SELECTEUR_FORMULAIRE_PANIER),
|
||||
recupereElementOuLeve,
|
||||
);
|
||||
const FORMULAIRE_LIVRAISON: HTMLDivElement = pipe(
|
||||
recupereElementDocumentEither<HTMLDivElement>(SELECTEUR_FORMULAIRE_LIVRAISON),
|
||||
recupereElementOuLeve,
|
||||
|
|
@ -88,6 +100,10 @@ const FORMULAIRE_FACTURATION: HTMLDivElement = pipe(
|
|||
recupereElementDocumentEither<HTMLDivElement>(SELECTEUR_FORMULAIRE_FACTURATION),
|
||||
recupereElementOuLeve,
|
||||
);
|
||||
const BOUTON_ACTIONS_FORMULAIRE: HTMLButtonElement = pipe(
|
||||
recupereElementDocumentEither<HTMLButtonElement>(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE),
|
||||
recupereElementOuLeve,
|
||||
);
|
||||
|
||||
/**
|
||||
* Fonction utilitaire pour récupérer un Élément dans une ligne (entrée) du Panier, en levant une
|
||||
|
|
@ -224,8 +240,8 @@ const initialiseMajEntreesPanier = (): void => {
|
|||
boutonSoustraction.addEventListener("click", (): void => {
|
||||
Maybe
|
||||
.fromNullable(champQuantite.valueAsNumber)
|
||||
.filter((valeur) => valeur > 1)
|
||||
.ifJust((valeur) => {
|
||||
.filter(valeur => valeur > 1)
|
||||
.ifJust(valeur => {
|
||||
Either
|
||||
// Valide les arguments de la requête
|
||||
.encase<Error, WCStoreCartUpdateItemArgs>(() =>
|
||||
|
|
@ -285,7 +301,7 @@ const initialiseMajEntreesPanier = (): void => {
|
|||
boutonAddition.addEventListener("click", (): void => {
|
||||
Maybe
|
||||
.fromNullable(champQuantite.valueAsNumber)
|
||||
.ifJust((valeur) => {
|
||||
.ifJust(valeur => {
|
||||
// Modifie des éléments du DOM pour signaler la requête et empêcher des doubles exécutions
|
||||
desactiveBoutonsEntreesPanier(entrees);
|
||||
|
||||
|
|
@ -365,7 +381,7 @@ const initialiseMajContenuPanier = (): void => {
|
|||
// Met à jour les entrées du Panier
|
||||
ENTREES_PANIER_EITHER.ifRight((entrees: Array<HTMLElement>) => {
|
||||
Maybe
|
||||
.fromNullable(entrees.find((entree) => entree.getAttribute(ATTRIBUT_CLE_PANIER) === ligne.key))
|
||||
.fromNullable(entrees.find(entree => entree.getAttribute(ATTRIBUT_CLE_PANIER) === ligne.key))
|
||||
.ifJust((entree: HTMLElement) => {
|
||||
// Fonction utilitaire
|
||||
const recupereElementDansEntree = recupereElementDansEntreePanierOuLeve(entree);
|
||||
|
|
@ -397,9 +413,92 @@ const initialiseMajContenuPanier = (): void => {
|
|||
|
||||
const initialiseMajFormulairesPanier = (): void => {
|
||||
BOUTON_SEPARATION_ADRESSES.addEventListener("click", () => {
|
||||
BOUTON_SEPARATION_ADRESSES.checked
|
||||
? FORMULAIRE_FACTURATION.removeAttribute(ATTRIBUT_HIDDEN)
|
||||
: FORMULAIRE_FACTURATION.setAttribute(ATTRIBUT_HIDDEN, "");
|
||||
Maybe
|
||||
.fromFalsy(BOUTON_SEPARATION_ADRESSES.checked)
|
||||
.ifJust((): void => {
|
||||
// Rend visible le formulaire de facturation
|
||||
FORMULAIRE_FACTURATION.removeAttribute(ATTRIBUT_HIDDEN);
|
||||
recupereElementsAvecSelecteur(FORMULAIRE_FACTURATION)("input, select")
|
||||
.ifRight(champs => champs.forEach(champ => champ.removeAttribute(ATTRIBUT_DESACTIVE)));
|
||||
})
|
||||
.ifNothing((): void => {
|
||||
FORMULAIRE_FACTURATION.setAttribute(ATTRIBUT_HIDDEN, "");
|
||||
recupereElementsAvecSelecteur(FORMULAIRE_FACTURATION)<HTMLInputElement | HTMLSelectElement>("input, select")
|
||||
.ifRight(champs =>
|
||||
champs.forEach(champ => {
|
||||
console.debug(champ);
|
||||
champ.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
champ.value = "";
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const initialiseBoutonActions = (): void => {
|
||||
BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", evenement => {
|
||||
Maybe
|
||||
.fromFalsy(FORMULAIRE_PANIER.checkValidity())
|
||||
.ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
FORMULAIRE_PANIER.removeAttribute(ATTRIBUT_HIDDEN);
|
||||
BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
})
|
||||
.ifJust(() => {
|
||||
// @ts-expect-error -- Problème de typage de la librairie DOM
|
||||
const donneesFormulaireLivraison: Record<string, string> = pipe(
|
||||
new FormData(FORMULAIRE_PANIER),
|
||||
formData => formData.entries(),
|
||||
Array.from,
|
||||
fromEntries,
|
||||
);
|
||||
|
||||
const argumentsFormulaire: WCStoreCartUpdateCustomerArgs = {
|
||||
shipping_address: {
|
||||
address_1: donneesFormulaireLivraison["livraison-adresse"] ?? "",
|
||||
address_2: "",
|
||||
city: donneesFormulaireLivraison["livraison-ville"] ?? "",
|
||||
company: "",
|
||||
country: "FR",
|
||||
first_name: donneesFormulaireLivraison["livraison-prenom"] ?? "",
|
||||
last_name: donneesFormulaireLivraison["livraison-nom"] ?? "",
|
||||
phone: donneesFormulaireLivraison["livraison-telephone"] ?? "",
|
||||
postcode: donneesFormulaireLivraison["livraison-code-postal"] ?? "",
|
||||
state: donneesFormulaireLivraison["livraison-region-etat"] ?? "",
|
||||
},
|
||||
};
|
||||
|
||||
Either
|
||||
.encase<ValiError<typeof WCStoreCartUpdateCustomerArgsSchema>, WCStoreCartUpdateCustomerArgs>(() =>
|
||||
parse(WCStoreCartUpdateCustomerArgsSchema, argumentsFormulaire)
|
||||
)
|
||||
.map(
|
||||
async (args: WCStoreCartUpdateCustomerArgs) => {
|
||||
await postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT,
|
||||
})
|
||||
.then(async (reponse: Response) => {
|
||||
// Traite le cas d'erreur 500
|
||||
if (estReponse500(reponse)) leveServerError("500 Server Error");
|
||||
|
||||
pipe(
|
||||
// Récupère la Réponse
|
||||
await reponse.json(),
|
||||
tap(a => console.debug(a)),
|
||||
// Traite tous les codes HTTPs possibles
|
||||
(corpsReponse: unknown) =>
|
||||
traiteReponseBackendWCSelonCodesHTTP<WCStoreCart, typeof WCStoreCartSchema>(
|
||||
corpsReponse,
|
||||
WCStoreCartSchema,
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
)
|
||||
.ifLeft(a => console.error(a.issues));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -408,4 +507,5 @@ document.addEventListener("DOMContentLoaded", (): void => {
|
|||
initialiseMajConteneurPanier();
|
||||
initialiseMajContenuPanier();
|
||||
initialiseMajFormulairesPanier();
|
||||
initialiseBoutonActions();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import {
|
|||
} from "./lib/erreurs.ts";
|
||||
import { estError, estHTMLSelectElement, estReponse500 } from "./lib/gardes.ts";
|
||||
import { emetMessageMajBoutonPanier } from "./lib/messages.ts";
|
||||
import { parseWCStoreCartAddItemArgs } from "./lib/schemas/cart-add-item.ts";
|
||||
import { WCStoreCartSchema } from "./lib/schemas/cart.ts";
|
||||
import { parseWCStoreCartAddItemArgs } from "./lib/schemas/cart-add-item.ts";
|
||||
import { estWCError } from "./lib/schemas/erreurs.ts";
|
||||
import { recupereElementDocumentEither, recupereElementsDocumentEither } from "./lib/utils.ts";
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ const gereBoiteInformationsProduit = () => {
|
|||
|
||||
onglets.set(idOnglet, [lien, sectionCorrespondante]);
|
||||
|
||||
lien.addEventListener("click", (e) => {
|
||||
lien.addEventListener("click", e => {
|
||||
/* Empêche la pollution de l'historique de navigation */
|
||||
e.preventDefault();
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ const gereBoiteInformationsProduit = () => {
|
|||
});
|
||||
|
||||
/* Ajout des Écouteurs d'Événements */
|
||||
SELECTEUR_VARIATION.addEventListener("change", (evenement) => {
|
||||
SELECTEUR_VARIATION.addEventListener("change", evenement => {
|
||||
pipe(
|
||||
evenement.target,
|
||||
Maybe.fromNullable,
|
||||
|
|
@ -134,7 +134,7 @@ const gereBoiteInformationsProduit = () => {
|
|||
validite => validite.ifJust((v: boolean) => BOUTON_AJOUT_PANIER.toggleAttribute(ATTRIBUT_DESACTIVE, !v)),
|
||||
);
|
||||
});
|
||||
BOUTON_AJOUT_PANIER.addEventListener("click", (_) => ajouteProduitAuPanier());
|
||||
BOUTON_AJOUT_PANIER.addEventListener("click", _ => ajouteProduitAuPanier());
|
||||
};
|
||||
|
||||
// TODO: Traiter le cas des Produits avec variations
|
||||
|
|
@ -160,7 +160,7 @@ const ajouteProduitAuPanier = () => {
|
|||
body: JSON.stringify(args),
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
[ENTETE_WC_NONCE]: ETATS_PAGE.nonce,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
<figure>
|
||||
<picture>
|
||||
<img
|
||||
alt="Haiku Atelier's Logo"
|
||||
height="25.6"
|
||||
src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg"
|
||||
alt="Haiku Atelier's Logo" height="25.6" src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg"
|
||||
width="80"
|
||||
/>
|
||||
</picture>
|
||||
|
|
@ -48,7 +46,10 @@
|
|||
|
||||
<section class="compte-panier">
|
||||
{# Bouton « Panier » avec l'indicateur de quantité de Produits #}
|
||||
<a class="lien-bouton" data-contient-articles="{{ articles_presents }}" href="{{ pages.cart.lien }}" rel="cart">
|
||||
<a
|
||||
class="lien-bouton" data-contient-articles="{{ articles_presents }}" href="{{ pages.cart.lien }}"
|
||||
rel="cart"
|
||||
>
|
||||
cart ({{ quantite_articles }})
|
||||
</a>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="{{ site.charset }}" />
|
||||
<meta name="description" content="{{ site.description }}" />
|
||||
|
|
@ -10,11 +10,13 @@
|
|||
<link rel="icon" href="{{site.theme.link}}/assets/img/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="manifest" href="{{site.theme.link}}/assets/site.webmanifest" />
|
||||
|
||||
{# <link
|
||||
href="{{ site.theme.link }}/static/img/favicon.svg"
|
||||
rel="shortcut icon"
|
||||
type="image/svg+xml"
|
||||
/> #}
|
||||
{#
|
||||
<link
|
||||
href="{{ site.theme.link }}/static/img/favicon.svg"
|
||||
rel="shortcut icon"
|
||||
type="image/svg+xml"
|
||||
/>
|
||||
#}
|
||||
|
||||
{{ function("wp_head") }}
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -10,24 +10,20 @@
|
|||
{# Bouton PayPal #}
|
||||
<button type="button">
|
||||
<img
|
||||
alt="PayPal's Logo"
|
||||
height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/logo-paypal.svg"
|
||||
alt="PayPal's Logo" height="18" src="{{ site.theme.link }}/assets/img/paypal/logo-paypal.svg"
|
||||
width="13.48"
|
||||
>
|
||||
/>
|
||||
<img
|
||||
alt="PayPal"
|
||||
height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/titre-paypal.svg"
|
||||
alt="PayPal" height="18" src="{{ site.theme.link }}/assets/img/paypal/titre-paypal.svg"
|
||||
width="67.69"
|
||||
>
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form action="" class="panneau__formulaires" method="post">
|
||||
<form id="formulaire-commande" class="panneau__formulaires" method="post">
|
||||
{# Formulaires pour la livraison et facturation #}
|
||||
<div class="panneau__formulaires__separation-adresses">
|
||||
<input id="separation-adresses" name="separation-adresses" type="checkbox">
|
||||
<input id="separation-adresses" name="separation-adresses" type="checkbox" />
|
||||
<label for="separation-adresses">Use a separate billing address</label>
|
||||
</div>
|
||||
|
||||
|
|
@ -38,106 +34,74 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-prenom">First name</label>
|
||||
<input
|
||||
autocomplete="given-name"
|
||||
id="livraison-prenom"
|
||||
name="livraison-prenom"
|
||||
minlength="2"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="given-name" id="livraison-prenom" minlength="2"
|
||||
name="livraison-prenom" required type="text"
|
||||
value="Gauthier"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-nom">Last name</label>
|
||||
<input
|
||||
autocomplete="family-name"
|
||||
id="livraison-nom"
|
||||
name="livraison-nom"
|
||||
minlength="2"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="family-name" id="livraison-nom" name="livraison-nom"
|
||||
minlength="2" required type="text"
|
||||
value="COLIN"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-adresse">Address</label>
|
||||
<input
|
||||
autocomplete="street-address"
|
||||
id="livraison-adresse"
|
||||
name="livraison-adresse"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="street-address" id="livraison-adresse" name="livraison-adresse"
|
||||
required type="text" value="5 rue de la Ville"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-code-postal">Postcode</label>
|
||||
<input
|
||||
autocomplete="postal-code"
|
||||
id="livraison-code-postal"
|
||||
minlength="3"
|
||||
name="livraison-code-postal"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="postal-code" id="livraison-code-postal" minlength="3"
|
||||
name="livraison-code-postal" required type="text"
|
||||
value="57000"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-ville">City</label>
|
||||
<input
|
||||
autocomplete="address-level2"
|
||||
id="livraison-ville"
|
||||
minlength="2"
|
||||
name="livraison-ville"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="address-level2" id="livraison-ville" minlength="2"
|
||||
name="livraison-ville" required type="text"
|
||||
value="Metz"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-region-etat">Region/State</label>
|
||||
<input
|
||||
autocomplete="address-level1"
|
||||
id="livraison-region-etat"
|
||||
name="livraison-region-etat"
|
||||
placeholder="If applicable"
|
||||
type="text"
|
||||
autocomplete="address-level1" id="livraison-region-etat" name="livraison-region-etat"
|
||||
placeholder="If applicable" type="text"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-pays">Country</label>
|
||||
<select
|
||||
id="livraison-pays"
|
||||
name="livraison-pays"
|
||||
required
|
||||
>
|
||||
</select>
|
||||
<label for="livraison-pays">Country</label> <select id="livraison-pays" name="livraison-pays" />
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-telephone">Phone</label>
|
||||
<input
|
||||
autocomplete="tel"
|
||||
id="livraison-telephone"
|
||||
minlength="6"
|
||||
name="livraison-telephone"
|
||||
placeholder="+33 6 03 03 03 03"
|
||||
required
|
||||
type="tel"
|
||||
autocomplete="tel" id="livraison-telephone" minlength="6"
|
||||
name="livraison-telephone" placeholder="+33 6 03 03 03 03" required
|
||||
type="tel" value="+33 6 03 03 03 03"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-email">Email Address</label>
|
||||
<input
|
||||
autocomplete="email"
|
||||
id="livraison-email"
|
||||
minlength="4"
|
||||
name="livraison-email"
|
||||
placeholder="moshimoshi@email.com"
|
||||
required
|
||||
type="email"
|
||||
autocomplete="email" id="livraison-email" minlength="4"
|
||||
name="livraison-email" placeholder="moshimoshi@email.com" required
|
||||
type="email" value="moshimoshi@email.com"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -150,10 +114,8 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-prenom">First name</label>
|
||||
<input
|
||||
autocomplete="given-name"
|
||||
id="facturation-prenom"
|
||||
name="facturation-prenom"
|
||||
required
|
||||
autocomplete="given-name" disabled id="facturation-prenom"
|
||||
name="facturation-prenom" minlength="2" required
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -161,10 +123,8 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-nom">Last name</label>
|
||||
<input
|
||||
autocomplete="family-name"
|
||||
id="facturation-nom"
|
||||
name="facturation-nom"
|
||||
required
|
||||
autocomplete="family-name" disabled id="facturation-nom"
|
||||
name="facturation-nom" minlength="2" required
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -172,21 +132,16 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-adresse">Address</label>
|
||||
<input
|
||||
autocomplete="street-address"
|
||||
id="facturation-adresse"
|
||||
name="facturation-adresse"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="street-address" disabled id="facturation-adresse"
|
||||
name="facturation-adresse" required type="text"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-code-postal">Postcode</label>
|
||||
<input
|
||||
autocomplete="postal-code"
|
||||
id="facturation-code-postal"
|
||||
name="facturation-code-postal"
|
||||
required
|
||||
autocomplete="postal-code" disabled id="facturation-code-postal"
|
||||
minlength="3" name="facturation-code-postal" required
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -194,10 +149,8 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-ville">City</label>
|
||||
<input
|
||||
autocomplete="address-level2"
|
||||
id="facturation-ville"
|
||||
name="facturation-ville"
|
||||
required
|
||||
autocomplete="address-level2" disabled id="facturation-ville"
|
||||
minlength="2" name="facturation-ville" required
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -205,45 +158,31 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-region-etat">Region/State</label>
|
||||
<input
|
||||
autocomplete="address-level1"
|
||||
id="facturation-region-etat"
|
||||
name="facturation-region-etat"
|
||||
placeholder="If applicable"
|
||||
type="text"
|
||||
autocomplete="address-level1" disabled id="facturation-region-etat"
|
||||
name="facturation-region-etat" placeholder="If applicable" type="text"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-pays">Country</label>
|
||||
<select
|
||||
id="facturation-pays"
|
||||
name="facturation-pays"
|
||||
required
|
||||
>
|
||||
</select>
|
||||
<select id="facturation-pays" disabled name="facturation-pays" />
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-telephone">Phone</label>
|
||||
<input
|
||||
autocomplete="tel"
|
||||
id="facturation-telephone"
|
||||
name="facturation-telephone"
|
||||
placeholder="+33 6 03 43 60 16"
|
||||
required
|
||||
type="tel"
|
||||
autocomplete="tel" disabled id="facturation-telephone"
|
||||
minlength="6" name="facturation-telephone" placeholder="+33 6 03 43 60 16"
|
||||
required type="tel"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-email">Email Address</label>
|
||||
<input
|
||||
autocomplete="email"
|
||||
id="facturation-email"
|
||||
name="facturation-email"
|
||||
placeholder="moshimoshi@email.com"
|
||||
required
|
||||
type="email"
|
||||
autocomplete="email" disabled id="facturation-email"
|
||||
minlength="4" name="facturation-email" placeholder="moshimoshi@email.com"
|
||||
required type="email"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -251,10 +190,25 @@
|
|||
|
||||
<div class="panneau__formulaires__paiement formulaire">
|
||||
<h3 class="formulaire__titre">Payment:</h3>
|
||||
|
||||
{# Carte de crédit via Stripe #}
|
||||
<div class="formulaire__paiement" />
|
||||
|
||||
{# PayPal #}
|
||||
<div class="formulaire__paiement">
|
||||
<div class="formulaire__paiement__attente-renseignement-formulaires">
|
||||
<p>Please fill out and submit the above form to make payment available.</p>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__paiement__choix" hidden>
|
||||
<label for="paiement-stripe">Credit card</label>
|
||||
<input id="paiement-stripe" name="type-paiement" type="radio" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<footer class="panneau__pied-de-page">
|
||||
<button type="submit">Check-out</button>
|
||||
<button form="formulaire-commande" type="submit">Submit</button>
|
||||
</footer>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -19,16 +19,14 @@
|
|||
{# Affiche tous les attributs relevants pour la variation choisie #}
|
||||
{% for attribut in produit.attributs %}
|
||||
{% if attribut.valeur %}
|
||||
{{ attribut.nom }} {{ attribut.valeur }}<br>
|
||||
{{ attribut.nom }} {{ attribut.valeur }}<br />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
<div class="detail-produit__actions">
|
||||
<button
|
||||
class="detail-produit__actions__soustraction"
|
||||
{{ produit.quantite > 1 ? "" : "disabled" }}
|
||||
type="button"
|
||||
class="detail-produit__actions__soustraction" {{ produit.quantite > 1 ? "" : "disabled" }} type="button"
|
||||
>
|
||||
-
|
||||
</button>
|
||||
|
|
@ -52,21 +50,17 @@
|
|||
<div class="panneau__emballages__choix__ligne">
|
||||
<label for="emballages-tous-produits">To all products</label>
|
||||
<input
|
||||
id="emballages-tous-produits"
|
||||
name="emballages"
|
||||
type="radio"
|
||||
id="emballages-tous-produits" name="emballages" type="radio"
|
||||
value="emballages-tous-produits"
|
||||
>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="panneau__emballages__choix__ligne">
|
||||
<label for="emballages-produits-specifiques">To specific products</label>
|
||||
<input
|
||||
id="emballages-produits-specifiques"
|
||||
name="emballages"
|
||||
type="radio"
|
||||
id="emballages-produits-specifiques" name="emballages" type="radio"
|
||||
value="emballages-produits-specifiques"
|
||||
>
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -74,26 +68,18 @@
|
|||
|
||||
<div class="panneau__instructions-code-promo">
|
||||
<textarea
|
||||
class="panneau__instructions-code-promo__instructions"
|
||||
id="instructions"
|
||||
maxlength="2000"
|
||||
class="panneau__instructions-code-promo__instructions" id="instructions" maxlength="2000"
|
||||
minlength="10"
|
||||
name="instructions"
|
||||
placeholder="Add special instructions for your order: specify the products you want wrapped and how (i.e. all in one bag or separated), a gift message, etc."
|
||||
resizable="false"
|
||||
rows="3"
|
||||
spellcheck="true"
|
||||
></textarea>
|
||||
resizable="false" rows="3" spellcheck="true"
|
||||
/>
|
||||
|
||||
<div class="panneau__instructions-code-promo__code-promo">
|
||||
<input
|
||||
id="code-promo"
|
||||
name="code-promo"
|
||||
placeholder="Discount code or gift card"
|
||||
type="text"
|
||||
maxlength="20"
|
||||
minlength="3"
|
||||
>
|
||||
id="code-promo" name="code-promo" placeholder="Discount code or gift card"
|
||||
type="text" maxlength="20" minlength="3"
|
||||
/>
|
||||
<button for="code-promo" type="button">Apply</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -103,11 +89,11 @@
|
|||
Subtotal: <strong>{{ sous_total_panier }} €</strong>
|
||||
</p>
|
||||
<p class="panneau__sous-totaux__ligne">
|
||||
Shipping: <strong>Enter your shipping address.</strong>
|
||||
Shipping: <strong>Enter your delivery address.</strong>
|
||||
</p>
|
||||
|
||||
<p class="panneau__sous-totaux__conditions-livraison">
|
||||
Belgium and France: free shipping.<br>
|
||||
Belgium and France: free shipping.<br />
|
||||
Worldwide: free shipping on orders above 150 €.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,59 @@
|
|||
{# Boîte flottante contenant les informations sur le Produit, en détails, et le sélecteur de quantité/taille pour l'ajout au Panier #}
|
||||
{#
|
||||
Boîte flottante contenant les informations sur le Produit, en détails, et le sélecteur de quantité/taille pour l'ajout au Panier
|
||||
#}
|
||||
|
||||
<aside aria-label="Product's details, size and quantity selection" class="informations-produit">
|
||||
<div class="informations-produit__conteneur">
|
||||
<section class="onglets-details-produit">
|
||||
{# Contenus #}
|
||||
<section role="tabpanel" id="details-produit" aria-labelledby="label-details-produit" hidden>
|
||||
<section
|
||||
role="tabpanel" id="details-produit" aria-labelledby="label-details-produit"
|
||||
hidden
|
||||
>
|
||||
{{ produit.details }}
|
||||
</section>
|
||||
|
||||
<section role="tabpanel" id="conditions-livraison" aria-labelledby="label-conditions-livraison" hidden>
|
||||
<section
|
||||
role="tabpanel" id="conditions-livraison" aria-labelledby="label-conditions-livraison"
|
||||
hidden
|
||||
>
|
||||
{{ descriptions_produits.texte_conditions_livraison }}
|
||||
</section>
|
||||
|
||||
<section role="tabpanel" id="entretien-produit" aria-labelledby="label-entretien-produit" hidden>
|
||||
<section
|
||||
role="tabpanel" id="entretien-produit" aria-labelledby="label-entretien-produit"
|
||||
hidden
|
||||
>
|
||||
{{ descriptions_produits.texte_entretien_produit }}
|
||||
</section>
|
||||
|
||||
{# Onglets #}
|
||||
<ul role="tablist">
|
||||
<li role="presentation">
|
||||
<a role="tab" href="#details-produit" id="label-details-produit" aria-selected="false">Details</a>
|
||||
<a
|
||||
role="tab" href="#details-produit" id="label-details-produit"
|
||||
aria-selected="false"
|
||||
>
|
||||
Details
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li role="presentation">
|
||||
<a role="tab" href="#conditions-livraison" id="label-conditions-livraison" aria-selected="false">Shipping</a>
|
||||
<a
|
||||
role="tab" href="#conditions-livraison" id="label-conditions-livraison"
|
||||
aria-selected="false"
|
||||
>
|
||||
Shipping
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li role="presentation">
|
||||
<a role="tab" href="#entretien-produit" id="label-entretien-produit" aria-selected="false">Care</a>
|
||||
<a
|
||||
role="tab" href="#entretien-produit" id="label-entretien-produit"
|
||||
aria-selected="false"
|
||||
>
|
||||
Care
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
|
@ -39,9 +65,7 @@
|
|||
<label id="label-selecteur-variation" for="selecteur-variation">Select size:</label>
|
||||
<div class="selecteur-produit__selection-variation__selecteurs">
|
||||
<select
|
||||
aria-labelledby="label-selecteur-variation"
|
||||
class="selecteur-natif"
|
||||
id="selecteur-variation"
|
||||
aria-labelledby="label-selecteur-variation" class="selecteur-natif" id="selecteur-variation"
|
||||
name="variations"
|
||||
>
|
||||
<option disabled selected value="">--</option>
|
||||
|
|
@ -50,11 +74,13 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
|
||||
{# <div aria-hidden="true" class="selecteur-personnalise">
|
||||
<button type="button">v</button>
|
||||
<div class="selecteur-personnalise__options">
|
||||
{#
|
||||
<div aria-hidden="true" class="selecteur-personnalise">
|
||||
<button type="button">v</button>
|
||||
<div class="selecteur-personnalise__options">
|
||||
</div>
|
||||
</div>
|
||||
</div> #}
|
||||
#}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -62,7 +88,12 @@
|
|||
</section>
|
||||
|
||||
<section class="actions-produit">
|
||||
<button class="bouton-case-pleine" disabled id="bouton-ajout-panier" type="button">Add to cart</button>
|
||||
<button
|
||||
class="bouton-case-pleine" disabled id="bouton-ajout-panier"
|
||||
type="button"
|
||||
>
|
||||
Add to cart
|
||||
</button>
|
||||
</section>
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue