2024-11-16
fonc(db) exporte la BDD de production corvée(images) optimise les images
|
|
@ -33,8 +33,22 @@
|
|||
text-transform: uppercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-l);
|
||||
}
|
||||
#page-succes-commande .contenu__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: var(--espace-xl);
|
||||
font-style: normal;
|
||||
}
|
||||
#page-succes-commande .contenu__textuel p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
#page-succes-commande .contenu__rappel-commande {
|
||||
display: flex;
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
flex-flow: column nowrap;
|
||||
}
|
||||
#page-succes-commande .contenu__rappel-commande__produit {
|
||||
|
|
@ -43,6 +57,9 @@
|
|||
grid-template-rows: 1fr;
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
}
|
||||
#page-succes-commande .contenu__rappel-commande__produit:only-child, #page-succes-commande .contenu__rappel-commande__produit:last-of-type {
|
||||
border-bottom: initial;
|
||||
}
|
||||
#page-succes-commande .contenu__rappel-commande__produit__illustratif {
|
||||
padding: var(--espace-l);
|
||||
border-right: 1px solid var(--couleur-noir);
|
||||
|
|
@ -88,19 +105,6 @@
|
|||
text-transform: lowercase;
|
||||
line-height: var(--hauteur-ligne-moitie);
|
||||
}
|
||||
#page-succes-commande .contenu__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: var(--espace-xl);
|
||||
font-style: normal;
|
||||
}
|
||||
#page-succes-commande .contenu__textuel p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
@media (width <= 50rem) {
|
||||
#page-succes-commande .contenu {
|
||||
border-right: initial;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-succes-commande.scss"],"names":[],"mappings":"AAEA;EAEE;AAAA;AAAA;EAKA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;;AAGA;EACE;IACE;;;AAQV;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;IACE;IACA","file":"page-succes-commande.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-succes-commande.scss"],"names":[],"mappings":"AAEA;EAEE;AAAA;AAAA;EAKA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAIF;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;;AAGA;EACE;IACE;;;AAQV;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAOR;EACE;IACE;IACA","file":"page-succes-commande.css"}
|
||||
|
|
@ -1 +1 @@
|
|||
#page-succes-commande{--page-hauteur-minimale:calc(100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px);--page-marges-bloc-debut:var(--en-tete-hauteur);margin-top:var(--page-marges-bloc-debut);margin-bottom:var(--espace-xl);border-bottom:1px solid var(--couleur-noir);flex-flow:column;display:flex}#page-succes-commande .contenu{width:min(50rem,100%);min-height:var(--page-hauteur-minimale);border:1px solid var(--couleur-noir);border-bottom:initial;flex-flow:column;place-items:center;margin:auto;font-style:italic;font-weight:500;display:flex}#page-succes-commande .contenu__en-tete{width:100%;padding:var(--espace-m)var(--espace-xl);color:var(--couleur-blanc);background:var(--couleur-noir)}#page-succes-commande .contenu__en-tete h2{text-transform:uppercase;width:fit-content;letter-spacing:var(--espacement-inter-lettres-etendu-l);margin:auto}#page-succes-commande .contenu__rappel-commande{flex-flow:column;display:flex}#page-succes-commande .contenu__rappel-commande__produit{border-bottom:1px solid var(--couleur-noir);grid-template-rows:1fr;grid-template-columns:1fr 1fr;display:grid}#page-succes-commande .contenu__rappel-commande__produit__illustratif{padding:var(--espace-l);border-right:1px solid var(--couleur-noir)}#page-succes-commande .contenu__rappel-commande__produit__illustratif picture{overflow:hidden}#page-succes-commande .contenu__rappel-commande__produit__illustratif img{aspect-ratio:1;height:auto;transition:scale .2s}@media (hover:hover){#page-succes-commande .contenu__rappel-commande__produit__illustratif img:hover{scale:1.1}}#page-succes-commande .contenu__rappel-commande .detail-produit{width:100%;padding:0 var(--espace-xl);flex-flow:column;place-content:center;font-style:italic;display:flex}#page-succes-commande .contenu__rappel-commande .detail-produit__nom-prix{column-gap:var(--espace-xl);font-size:var(--espace-l);line-height:var(--hauteur-ligne-moitie);margin-bottom:var(--espace-xs);flex-flow:row;justify-content:space-between;display:flex}#page-succes-commande .contenu__rappel-commande .detail-produit__nom-prix span{text-align:right;min-width:4rem;font-weight:600;font-style:initial}#page-succes-commande .contenu__rappel-commande .detail-produit__description{margin-bottom:var(--espace-l);text-transform:lowercase;line-height:var(--hauteur-ligne-moitie)}#page-succes-commande .contenu__textuel{max-width:34rem;height:100%;padding:var(--espace-xl);flex-flow:column;flex:1;place-content:center;font-style:normal;display:flex}#page-succes-commande .contenu__textuel p+p{margin-top:var(--espace-m)}@media (width<=50rem){#page-succes-commande .contenu{border-right:initial;border-left:initial}}
|
||||
#page-succes-commande{--page-hauteur-minimale:calc(100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px);--page-marges-bloc-debut:var(--en-tete-hauteur);margin-top:var(--page-marges-bloc-debut);margin-bottom:var(--espace-xl);border-bottom:1px solid var(--couleur-noir);flex-flow:column;display:flex}#page-succes-commande .contenu{width:min(50rem,100%);min-height:var(--page-hauteur-minimale);border:1px solid var(--couleur-noir);border-bottom:initial;flex-flow:column;place-items:center;margin:auto;font-style:italic;font-weight:500;display:flex}#page-succes-commande .contenu__en-tete{width:100%;padding:var(--espace-m)var(--espace-xl);color:var(--couleur-blanc);background:var(--couleur-noir)}#page-succes-commande .contenu__en-tete h2{text-transform:uppercase;width:fit-content;letter-spacing:var(--espacement-inter-lettres-etendu-l);margin:auto}#page-succes-commande .contenu__textuel{max-width:34rem;height:100%;padding:var(--espace-xl);flex-flow:column;flex:1;place-content:center;font-style:normal;display:flex}#page-succes-commande .contenu__textuel p+p{margin-top:var(--espace-m)}#page-succes-commande .contenu__rappel-commande{border-top:1px solid var(--couleur-noir);flex-flow:column;display:flex}#page-succes-commande .contenu__rappel-commande__produit{border-bottom:1px solid var(--couleur-noir);grid-template-rows:1fr;grid-template-columns:1fr 1fr;display:grid}#page-succes-commande .contenu__rappel-commande__produit:only-child,#page-succes-commande .contenu__rappel-commande__produit:last-of-type{border-bottom:initial}#page-succes-commande .contenu__rappel-commande__produit__illustratif{padding:var(--espace-l);border-right:1px solid var(--couleur-noir)}#page-succes-commande .contenu__rappel-commande__produit__illustratif picture{overflow:hidden}#page-succes-commande .contenu__rappel-commande__produit__illustratif img{aspect-ratio:1;height:auto;transition:scale .2s}@media (hover:hover){#page-succes-commande .contenu__rappel-commande__produit__illustratif img:hover{scale:1.1}}#page-succes-commande .contenu__rappel-commande .detail-produit{width:100%;padding:0 var(--espace-xl);flex-flow:column;place-content:center;font-style:italic;display:flex}#page-succes-commande .contenu__rappel-commande .detail-produit__nom-prix{column-gap:var(--espace-xl);font-size:var(--espace-l);line-height:var(--hauteur-ligne-moitie);margin-bottom:var(--espace-xs);flex-flow:row;justify-content:space-between;display:flex}#page-succes-commande .contenu__rappel-commande .detail-produit__nom-prix span{text-align:right;min-width:4rem;font-weight:600;font-style:initial}#page-succes-commande .contenu__rappel-commande .detail-produit__description{margin-bottom:var(--espace-l);text-transform:lowercase;line-height:var(--hauteur-ligne-moitie)}@media (width<=50rem){#page-succes-commande .contenu{border-right:initial;border-left:initial}}
|
||||
|
Before Width: | Height: | Size: 367 KiB After Width: | Height: | Size: 365 KiB |
|
Before Width: | Height: | Size: 569 KiB After Width: | Height: | Size: 568 KiB |
|
Before Width: | Height: | Size: 367 KiB After Width: | Height: | Size: 365 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 56 KiB |
|
|
@ -34,16 +34,16 @@
|
|||
],
|
||||
"integrity": "sha512-wORZ0WkOfNuzAUKhf7XA8LXG4geR64dUCIHwukqdLnUhkEFdeLpLtmDfuYMl5Aff09c7XjJxUQIVGwRb8uTbcA=="
|
||||
},
|
||||
"_index.BueHQ6RV.js": {
|
||||
"file": "index.BueHQ6RV.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-JBA3vYABLBXOw7LPZvJ/nt9oHANX6kp2Z2E/w1XzsUXxOaoZO3nu42tV+lS4ZPZuhfTlrKRT+UVfAzLwMapX5A=="
|
||||
},
|
||||
"_index.CeK6pfoJ.js": {
|
||||
"file": "index.CeK6pfoJ.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-cxTw0sKKut2H95JwMgiKgEVLyZ0QswK/HydKTapcqcs3w6xHIHNUpYBLdRzEYdeRfHKUsA0kvPNBXBk/QeazjQ=="
|
||||
},
|
||||
"_index.vOxCZRxB.js": {
|
||||
"file": "index.vOxCZRxB.js",
|
||||
"name": "index",
|
||||
"integrity": "sha512-Lux2XD7sQMuHJ9D8UAyRrkvpTiI+5S4Fj0z4ybzKChia8TcBum+HiZdEFyX0AIU5palFJZilsf8WzTrLLxCYaw=="
|
||||
},
|
||||
"_pipe.XPB0wEfw.js": {
|
||||
"file": "pipe.XPB0wEfw.js",
|
||||
"name": "pipe",
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.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",
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
|
||||
],
|
||||
"integrity": "sha512-eCAQZVQSA+5btfz3LobyZKZKLeygRne9GOvE2bMw7YNvUkvUd/CGfRXOzhRIE99MkTRjDfYk6nBv03Kdo/Dahw=="
|
||||
"integrity": "sha512-QtGHwwLAUMLn3d5PMPRBnRvCjGVzSEeJLATdkWoWXa2RSgsIVe02+sE005Sc/iGhSD1CQtCzy/qwSVYODhhDIA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts": {
|
||||
"file": "nombres.js",
|
||||
|
|
@ -178,14 +178,14 @@
|
|||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.CeK6pfoJ.js",
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.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/api/erreurs.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_exports.DT-46nyp.js"
|
||||
],
|
||||
"integrity": "sha512-Wb8z//28EPg7tcrbAGMTUWNyJ4pZsqXr4WA1U5JSewStanmdiKKmkn0Z1T4PYdei4n01mwu+0Q9q7W9JhzQKzQ=="
|
||||
"integrity": "sha512-NF7XsDZgkHTp3/pxL2+0aE1lwFRqNptSpywY06msZIRGcKGtffliQ6cX6dpkHLvI+xsGlUMkPS9u4f7sXXNnsA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts": {
|
||||
"file": "adresses.js",
|
||||
|
|
@ -193,9 +193,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js"
|
||||
"_index.vOxCZRxB.js"
|
||||
],
|
||||
"integrity": "sha512-l7cyXThYwsirOWk5NiFfPijbV8SnXS8HN9wWAsFAU7y1XufGR9Ly0EkiDLnqFtmTdwavl7Mu4OeeqLePol3z0g=="
|
||||
"integrity": "sha512-ZozzERJ/+3ez2qN+3PzXf9qXAu3ScxG5L+qxYBxFYSc1x0rQxEjqnB8QTFInKq3J3+sIKrEdi4iQwcsncMKhsQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-add-item.ts": {
|
||||
"file": "cart-add-item.js",
|
||||
|
|
@ -203,9 +203,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-add-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js"
|
||||
"_index.vOxCZRxB.js"
|
||||
],
|
||||
"integrity": "sha512-1L1gE2CvO306LqYlQlM4NJa4yPg6OQDShh6O/E0aauxb9uWLtyVAkS6F2I7i+B2YVtyWW1TvSpkES90hF9Qx8g=="
|
||||
"integrity": "sha512-wh9+pUSi4EGGbWn+dhEIPT98ASrwJb4aFoCzFUxOUlJtETqDxAGm3pyBwsvn3xcNrms6ZKBq60CHkiA0qRU9rg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-remove-item.ts": {
|
||||
"file": "cart-remove-item.js",
|
||||
|
|
@ -213,9 +213,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-remove-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js"
|
||||
"_index.vOxCZRxB.js"
|
||||
],
|
||||
"integrity": "sha512-6/1H1KIM6V1DSOrQ9DfPm1nWL+TfjgakrWtXFPHqwN06Am5fW6fMgwc3MpOx9O+64mM5x6/OWCP4S9Vfkf4oOA=="
|
||||
"integrity": "sha512-oXQuwf7xJvRaELaA7Zep2rD0YkbpRikxz06+K/11fNDbifJ+Rs7aDzJnaXL+lae2W7qJ7QLcLFhzRsEqW1ndcw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-update-customer.ts": {
|
||||
"file": "cart-update-customer.js",
|
||||
|
|
@ -223,10 +223,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-update-customer.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-oAEKlHsEbWgZpB6hXfn+BOyXYrEdUPTWPTn0jb02G86LlqNA1QxtXAyvG374HCT+0VbCwIj+vOIoTEsYWKCtAA=="
|
||||
"integrity": "sha512-ooa/m7RsZkRnIfSAQ0NIAWGG/iPxgUV0k40aEyDoEEWhW9F3hVyjROsM4IF2YrFtmysMUR6SIPlhmHtBZEfCpA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-update-item.ts": {
|
||||
"file": "cart-update-item.js",
|
||||
|
|
@ -234,9 +234,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-update-item.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js"
|
||||
"_index.vOxCZRxB.js"
|
||||
],
|
||||
"integrity": "sha512-i5nOdW2LgVQLh2RtxfxbzVEOmdgOu2C6rckoxPKeETkyBppGdHMlUGqdDdy10u73KlLRArjnIrtiz/AGnKIp+w=="
|
||||
"integrity": "sha512-HR6ZipNiVyUUe4khKkmIwhFvvVhq08QIGzRBe4A0niGkG24TmPXLKb8McMniCAlwlS5f6UYpoNDYE/ld00EUHA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts": {
|
||||
"file": "cart.js",
|
||||
|
|
@ -244,12 +244,12 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
|
||||
],
|
||||
"integrity": "sha512-4yTWIWIkf/MYbBJCaHxxfVVs1djAGOlLL2+uLKC9WoWMUiTkD4MvayvDvSSbimr7c/FF6N/dk9EdM5YC1Ycflw=="
|
||||
"integrity": "sha512-5uQeT0cNp93usdnr3qSLytMU2D+O7U+LGfZDtdNuyEULYdF6AXzVVfE7a7no+gmL9a6t/AJ4X10Ps4yG1djRMQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts": {
|
||||
"file": "couts-livraison.js",
|
||||
|
|
@ -257,10 +257,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-mu/KcAH7KjbWMUDGatCbRUUkqsVskBxmIw3Gsaxz+tAlVMEfqvjKBJ+PB/yW1Em91eMSCHl7tF95Bq1hOLv0oA=="
|
||||
"integrity": "sha512-0AmHHM6NVjtGyoO0Lzdv1TebJqblQIuzudEsW/n7ISi9dXHxZC2nONxkz3nCHx7FApEmjodvD21tOONhnSQePQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts": {
|
||||
"file": "erreurs2.js",
|
||||
|
|
@ -268,9 +268,9 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js"
|
||||
"_index.vOxCZRxB.js"
|
||||
],
|
||||
"integrity": "sha512-KHz2JNlQR5m9V3daJ5+NQvhfvx0ZngG6Aic0Uug8OO7TkTTc9OXGzCxPuorNqQXH52FfLXkCqlnELH5tlSNA0A=="
|
||||
"integrity": "sha512-5+wiQwo5033g4G/4Gz6a1x6rzPwmSZpiXrZ8RtOZU8BPnDHOKVXCbpWc32Mnsxz9ClfYwHwLuUk+Q2RF12zMsg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/products.ts": {
|
||||
"file": "products3.js",
|
||||
|
|
@ -278,10 +278,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/products.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts"
|
||||
],
|
||||
"integrity": "sha512-R4IyPyalPJS2dinZnRB0MWTnv0oyfo35iQhpElTXWoRcPXFJAYqcma0Uuz5SBpNl6RBlG9JTzvMdaeeB8BApVA=="
|
||||
"integrity": "sha512-B2JOxUeUPbvVsZB9rA+t3QEtWKlvqaOlBxFtmo4s8kJ28anuMp7AAMfql8tK6y3Hf7FNMJ2RO+s9hPKh/tgqlA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/orders.ts": {
|
||||
"file": "orders2.js",
|
||||
|
|
@ -289,11 +289,11 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/orders.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-c5+UiPuLEs8VaqHU08+BZhULPTykmcG2lvEBzN5KrIvu+vU0gzQ4CvieROpHLoaMJ+GooVMG4vxCnPcupSDtrg=="
|
||||
"integrity": "sha512-24PlxUQrz6ejqPwzFwRUGmxDOosMOuZ/HgAzedIYAUSamj7lF2/FzAqrOWap+M1hhWbua0EjJok4pFhsr+EQBQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/products.ts": {
|
||||
"file": "products.js",
|
||||
|
|
@ -301,10 +301,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/products.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts"
|
||||
],
|
||||
"integrity": "sha512-vqzsZjVwevOjikB2eQx/Ksd/iusSTiyCI6/tyC0pIxyrAb7dN/PHRh0X1hWJyMgE0LA7Vibe9j6jxhz4E+uXkw=="
|
||||
"integrity": "sha512-1VQEloNbhA+54llRyt3owm4pXzU9+SuJkkozMoP4JiY6JhPBH21ufeCkNsalxwg1SH4jPJdYQtUJc/OG2R94sg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts": {
|
||||
"file": "messages2.js",
|
||||
|
|
@ -312,14 +312,14 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
|
||||
],
|
||||
"integrity": "sha512-DeWFclQ++JTWvSSRkaPB20ZUDIgmRIyuGb5DRSUI1I80Mx4ZOR+bLnCiiWevRtyti9AXTuCCZAft5f9CUxhk0A=="
|
||||
"integrity": "sha512-mC6JBhQI3fThxOXUeU/vQTcuT37fiJM2o7mkksZoThNU0Od2dQCAPnST1TULVYAwv8Uvzx4IqkZPw75IGF0SKA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/v3/orders.ts": {
|
||||
"file": "orders.js",
|
||||
|
|
@ -355,10 +355,10 @@
|
|||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"_Either.wHNxn7Os.js"
|
||||
],
|
||||
"integrity": "sha512-cXdOshDN3m5f4K9MkDFTGd3++CFabxWu3SWHuXfn4h6d08cwXm8jzWKsYU2tn7bKFGrEMamY/l13znqyAMi1Gg=="
|
||||
"integrity": "sha512-+dSbgJRPO7l2MBVJpX0eHJIDZptdyXEAiWKXR3cgW6gWKVXTXFLk3h42gTinXL9NmnsI1jxJGlKWWoTHs4Nhcw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
||||
"file": "scripts-bouton-panier.js",
|
||||
|
|
@ -375,14 +375,14 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_exports.DT-46nyp.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
|
||||
],
|
||||
"integrity": "sha512-yUikXIr9hYYjSvORQsWQB8+N3FlCZN4um77zcgiuCIhB0rYkDlHlCJnvuos3kfSpKLAcaxUNP/TdJW1hv12Hxw=="
|
||||
"integrity": "sha512-WXJlr8wJQQ6hGAQD1XYFS1KHsAGLfSaFuZnKCBLjNkomxcHpNnirhqzToNb40qB2rpztaUdFJXdYGPaOZtUOJA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts": {
|
||||
"file": "scripts-menu-categories.js",
|
||||
|
|
@ -458,7 +458,7 @@
|
|||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.CeK6pfoJ.js",
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.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",
|
||||
|
|
@ -476,7 +476,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts",
|
||||
"_belt_Option-91f3b350.BKMoZFhU.js"
|
||||
],
|
||||
"integrity": "sha512-J4XtTd9tWX0+Dl6sIWBRvaIZ24RWU8wtAQQ/S/gPPACz3XO3i8EroaoQIluKX9nnPYEqK8LcTE0mASPzah1vcw=="
|
||||
"integrity": "sha512-P9QdmUWmdjkYxlrHmMDx/ejjHgsFUDJX/2JoGO2HB4CbTMPELjeECkxaTUdmA4Z0SgL4rNXIjNLyZl6DtaFacA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
||||
"file": "scripts-page-panier.js",
|
||||
|
|
@ -485,7 +485,7 @@
|
|||
"isEntry": true,
|
||||
"imports": [
|
||||
"_index.CeK6pfoJ.js",
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.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",
|
||||
|
|
@ -513,7 +513,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts",
|
||||
"_belt_Option-91f3b350.BKMoZFhU.js"
|
||||
],
|
||||
"integrity": "sha512-fp2E3bO0cLM1/k29tp+AVwSD7jOyu4GxspyAGtQHv1i0+6P58iumwE3ByvI+i6m6iJB5uUQMz+QYJv1JOQaF+A=="
|
||||
"integrity": "sha512-8+eYxf2c6PIUILniQ5nr+L5W1yiWXTU1NziY6DZXYI+aNU6HGQ+IU5kfBgMGx3ck2+0lqf2TMKl37TP8U7vfng=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
||||
"file": "scripts-page-produit.js",
|
||||
|
|
@ -537,7 +537,7 @@
|
|||
"_index-0eef19ec.CFsloYN6.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.DT-46nyp.js",
|
||||
"_index.BueHQ6RV.js",
|
||||
"_index.vOxCZRxB.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/lib/schemas/api/erreurs.ts",
|
||||
|
|
@ -546,6 +546,6 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts",
|
||||
"_belt_Option-91f3b350.BKMoZFhU.js"
|
||||
],
|
||||
"integrity": "sha512-JyLoXCoym4LGwN9MCrYmQ1wD/YmiZ9edQAUWT12MHkgaS7bdtivh0nFwexmnT/aEVXgFxGEg8a8jN8+Azkg41g=="
|
||||
"integrity": "sha512-OFjdP0UAF1P5JPw9BGpyvfWrP/bVtMFZ4P5MYFi4cVDcxYI8vlOonNwH/dhvekHcihGwFzWPkiNsqfPSM9o/OA=="
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, s as string } from "./index.BueHQ6RV.js";
|
||||
import { o as object, s as string } from "./index.vOxCZRxB.js";
|
||||
const WCStoreBillingAddressSchema = object({
|
||||
address_1: string(),
|
||||
address_2: string(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, c as optional, b as array, s as string, n as number } from "./index.BueHQ6RV.js";
|
||||
import { o as object, c as optional, b as array, s as string, n as number } from "./index.vOxCZRxB.js";
|
||||
const WCStoreCartAddItemArgsItemsSchema = object({
|
||||
/** Variation attribute name. */
|
||||
attribute: string(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, s as string } from "./index.BueHQ6RV.js";
|
||||
import { o as object, s as string } from "./index.vOxCZRxB.js";
|
||||
const WCStoreCartRemoveItemArgsSchema = object({
|
||||
/** Unique identifier (key) for the basket item. */
|
||||
key: string()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, c as optional } from "./index.BueHQ6RV.js";
|
||||
import { o as object, c as optional } from "./index.vOxCZRxB.js";
|
||||
import { W as WCStoreShippingAddressSchema, a as WCStoreBillingAddressSchema } from "./adresses.js";
|
||||
const WCStoreCartUpdateCustomerArgsSchema = object({
|
||||
billing_address: optional(WCStoreBillingAddressSchema),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, a as pipe, m as minValue, n as number, s as string } from "./index.BueHQ6RV.js";
|
||||
import { o as object, a as pipe, m as minValue, n as number, s as string } from "./index.vOxCZRxB.js";
|
||||
const WCStoreCartUpdateItemArgsSchema = object({
|
||||
/** Unique identifier (key) for the basket item to update. */
|
||||
key: string(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, b as array, u as unknown, s as string, n as number, d as boolean, a as pipe, f as url, g as union, h as null_, e as enum_, i as integer } from "./index.BueHQ6RV.js";
|
||||
import { o as object, b as array, u as unknown, s as string, n as number, d as boolean, a as pipe, f as url, g as union, h as null_, e as enum_, i as integer } from "./index.vOxCZRxB.js";
|
||||
import { C as CATALOG_VISIBILITIES } from "./cart2.js";
|
||||
import { W as WCStoreShippingAddressSchema, a as WCStoreBillingAddressSchema } from "./adresses.js";
|
||||
import { a as WCStoreShippingRateSchema } from "./couts-livraison.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, b as array, s as string, d as boolean, u as unknown, n as number, j as omit } from "./index.BueHQ6RV.js";
|
||||
import { o as object, b as array, s as string, d as boolean, u as unknown, n as number, j as omit } from "./index.vOxCZRxB.js";
|
||||
import { W as WCStoreShippingAddressSchema } from "./adresses.js";
|
||||
const WCStoreShippingRateItemSchema = object({
|
||||
key: string(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { l as is, o as object, n as number, s as string } from "./index.BueHQ6RV.js";
|
||||
import { l as is, o as object, n as number, s as string } from "./index.vOxCZRxB.js";
|
||||
const WCErrorBodySchema = object({
|
||||
code: string(),
|
||||
data: object({
|
||||
|
|
|
|||
|
|
@ -70,6 +70,15 @@ function _addIssue(context, label, dataset, config2, other) {
|
|||
dataset.issues = [issue];
|
||||
}
|
||||
}
|
||||
function _getStandardProps(context) {
|
||||
return {
|
||||
version: 1,
|
||||
vendor: "valibot",
|
||||
validate(value2) {
|
||||
return context["~run"]({ value: value2 }, getGlobalConfig());
|
||||
}
|
||||
};
|
||||
}
|
||||
function _joinExpects(values, separator) {
|
||||
const list = [...new Set(values)];
|
||||
if (list.length > 1) {
|
||||
|
|
@ -102,7 +111,7 @@ function integer(message) {
|
|||
expects: null,
|
||||
requirement: Number.isInteger,
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.typed && !this.requirement(dataset.value)) {
|
||||
_addIssue(this, "integer", dataset, config2);
|
||||
}
|
||||
|
|
@ -119,7 +128,7 @@ function maxValue(requirement, message) {
|
|||
expects: `<=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`,
|
||||
requirement,
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.typed && !(dataset.value <= this.requirement)) {
|
||||
_addIssue(this, "value", dataset, config2, {
|
||||
received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)
|
||||
|
|
@ -138,7 +147,7 @@ function minValue(requirement, message) {
|
|||
expects: `>=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`,
|
||||
requirement,
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.typed && !(dataset.value >= this.requirement)) {
|
||||
_addIssue(this, "value", dataset, config2, {
|
||||
received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)
|
||||
|
|
@ -164,7 +173,7 @@ function url(message) {
|
|||
}
|
||||
},
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.typed && !this.requirement(dataset.value)) {
|
||||
_addIssue(this, "URL", dataset, config2);
|
||||
}
|
||||
|
|
@ -181,7 +190,7 @@ function value(requirement, message) {
|
|||
expects: requirement instanceof Date ? requirement.toJSON() : _stringify(requirement),
|
||||
requirement,
|
||||
message,
|
||||
"~validate"(dataset, config2) {
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.typed && !(this.requirement <= dataset.value && this.requirement >= dataset.value)) {
|
||||
_addIssue(this, "value", dataset, config2, {
|
||||
received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)
|
||||
|
|
@ -201,7 +210,7 @@ function getDefault(schema, dataset, config2) {
|
|||
);
|
||||
}
|
||||
function is(schema, input) {
|
||||
return !schema["~validate"]({ value: input }, { abortEarly: true }).issues;
|
||||
return !schema["~run"]({ value: input }, { abortEarly: true }).issues;
|
||||
}
|
||||
function array(item, message) {
|
||||
return {
|
||||
|
|
@ -212,16 +221,17 @@ function array(item, message) {
|
|||
async: false,
|
||||
item,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
const input = dataset.value;
|
||||
if (Array.isArray(input)) {
|
||||
dataset.typed = true;
|
||||
dataset.value = [];
|
||||
for (let key = 0; key < input.length; key++) {
|
||||
const value2 = input[key];
|
||||
const itemDataset = this.item["~validate"]({ value: value2 }, config2);
|
||||
const itemDataset = this.item["~run"]({ value: value2 }, config2);
|
||||
if (itemDataset.issues) {
|
||||
const pathItem = {
|
||||
type: "array",
|
||||
|
|
@ -266,9 +276,10 @@ function boolean(message) {
|
|||
expects: "boolean",
|
||||
async: false,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (typeof dataset.value === "boolean") {
|
||||
dataset.typed = true;
|
||||
} else {
|
||||
|
|
@ -289,9 +300,10 @@ function enum_(enum__, message) {
|
|||
enum: enum__,
|
||||
options,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (this.options.includes(dataset.value)) {
|
||||
dataset.typed = true;
|
||||
} else {
|
||||
|
|
@ -309,9 +321,10 @@ function null_(message) {
|
|||
expects: "null",
|
||||
async: false,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.value === null) {
|
||||
dataset.typed = true;
|
||||
} else {
|
||||
|
|
@ -329,9 +342,10 @@ function number(message) {
|
|||
expects: "number",
|
||||
async: false,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (typeof dataset.value === "number" && !isNaN(dataset.value)) {
|
||||
dataset.typed = true;
|
||||
} else {
|
||||
|
|
@ -350,19 +364,17 @@ function object(entries, message) {
|
|||
async: false,
|
||||
entries,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
const input = dataset.value;
|
||||
if (input && typeof input === "object") {
|
||||
dataset.typed = true;
|
||||
dataset.value = {};
|
||||
for (const key in this.entries) {
|
||||
const value2 = input[key];
|
||||
const valueDataset = this.entries[key]["~validate"](
|
||||
{ value: value2 },
|
||||
config2
|
||||
);
|
||||
const valueDataset = this.entries[key]["~run"]({ value: value2 }, config2);
|
||||
if (valueDataset.issues) {
|
||||
const pathItem = {
|
||||
type: "object",
|
||||
|
|
@ -410,9 +422,10 @@ function optional(wrapped, default_) {
|
|||
async: false,
|
||||
wrapped,
|
||||
default: default_,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (dataset.value === void 0) {
|
||||
if (this.default !== void 0) {
|
||||
dataset.value = getDefault(this, dataset, config2);
|
||||
|
|
@ -422,7 +435,7 @@ function optional(wrapped, default_) {
|
|||
return dataset;
|
||||
}
|
||||
}
|
||||
return this.wrapped["~validate"](dataset, config2);
|
||||
return this.wrapped["~run"](dataset, config2);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -434,9 +447,10 @@ function string(message) {
|
|||
expects: "string",
|
||||
async: false,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
if (typeof dataset.value === "string") {
|
||||
dataset.typed = true;
|
||||
} else {
|
||||
|
|
@ -471,17 +485,15 @@ function union(options, message) {
|
|||
async: false,
|
||||
options,
|
||||
message,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset, config2) {
|
||||
let validDataset;
|
||||
let typedDatasets;
|
||||
let untypedDatasets;
|
||||
for (const schema of this.options) {
|
||||
const optionDataset = schema["~validate"](
|
||||
{ value: dataset.value },
|
||||
config2
|
||||
);
|
||||
const optionDataset = schema["~run"]({ value: dataset.value }, config2);
|
||||
if (optionDataset.typed) {
|
||||
if (optionDataset.issues) {
|
||||
if (typedDatasets) {
|
||||
|
|
@ -530,9 +542,10 @@ function unknown() {
|
|||
reference: unknown,
|
||||
expects: "unknown",
|
||||
async: false,
|
||||
"~standard": 1,
|
||||
"~vendor": "valibot",
|
||||
"~validate"(dataset) {
|
||||
get "~standard"() {
|
||||
return _getStandardProps(this);
|
||||
},
|
||||
"~run"(dataset) {
|
||||
dataset.typed = true;
|
||||
return dataset;
|
||||
}
|
||||
|
|
@ -548,10 +561,7 @@ function omit(schema, keys) {
|
|||
return { ...schema, entries };
|
||||
}
|
||||
function parse(schema, input, config2) {
|
||||
const dataset = schema["~validate"](
|
||||
{ value: input },
|
||||
getGlobalConfig(config2)
|
||||
);
|
||||
const dataset = schema["~run"]({ value: input }, getGlobalConfig(config2));
|
||||
if (dataset.issues) {
|
||||
throw new ValiError(dataset.issues);
|
||||
}
|
||||
|
|
@ -561,7 +571,7 @@ function pipe(...pipe2) {
|
|||
return {
|
||||
...pipe2[0],
|
||||
pipe: pipe2,
|
||||
"~validate"(dataset, config2 = getGlobalConfig()) {
|
||||
"~run"(dataset, config2) {
|
||||
for (const item of pipe2) {
|
||||
if (item.kind !== "metadata") {
|
||||
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
||||
|
|
@ -569,7 +579,7 @@ function pipe(...pipe2) {
|
|||
break;
|
||||
}
|
||||
if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {
|
||||
dataset = item["~validate"](dataset, config2);
|
||||
dataset = item["~run"](dataset, config2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -599,4 +609,4 @@ export {
|
|||
unknown as u,
|
||||
value as v
|
||||
};
|
||||
//# sourceMappingURL=index.BueHQ6RV.js.map
|
||||
//# sourceMappingURL=index.vOxCZRxB.js.map
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { p as parse } from "./index.BueHQ6RV.js";
|
||||
import { p as parse } from "./index.vOxCZRxB.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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { e as enum_, o as object, a as pipe, v as value, s as string, n as number, b as array } from "./index.BueHQ6RV.js";
|
||||
import { e as enum_, o as object, a as pipe, v as value, s as string, n as number, b as array } from "./index.vOxCZRxB.js";
|
||||
import { T as TYPES_MESSAGES } from "./messages3.js";
|
||||
import { a as WCStoreCartItemSchema } from "./cart.js";
|
||||
import "./cart2.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, s as string, b as array, a as pipe, i as integer, n as number, e as enum_, u as unknown, c as optional, d as boolean, g as union, h as null_ } from "./index.BueHQ6RV.js";
|
||||
import { o as object, s as string, b as array, a as pipe, i as integer, n as number, e as enum_, u as unknown, c as optional, d as boolean, g as union, h as null_ } from "./index.vOxCZRxB.js";
|
||||
import { T as TAX_STATUSES, O as ORDER_STATUSES } from "./orders3.js";
|
||||
import { W as WCStoreShippingAddressSchema, a as WCStoreBillingAddressSchema } from "./adresses.js";
|
||||
const WCV3OrdersCouponLineMetaDataSchema = object({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, c as optional, e as enum_, s as string, b as array, a as pipe, k as maxValue, m as minValue, n as number, i as integer, d as boolean, u as unknown, g as union, h as null_, f as url } from "./index.BueHQ6RV.js";
|
||||
import { o as object, c as optional, e as enum_, s as string, b as array, a as pipe, k as maxValue, m as minValue, n as number, i as integer, d as boolean, u as unknown, g as union, h as null_, f as url } from "./index.vOxCZRxB.js";
|
||||
import { P as PRODUCT_TYPES, T as TAG_OPERATORS, S as STOCK_STATUSES, a as PRODUCT_STATUTES, R as RATINGS, O as ORDERBY_VALUES, b as ORDER_VALUES, D as DATE_COLUMN_VALUES, c as PRODUCTS_CONTEXTES, C as CATEGORY_OPERATORS, d as CATALOG_VISIBILITIES, A as ATTRIBUTES_RELATIONS, e as TAX_STATUTES, B as BACKORDERS_SETTINGS } from "./products2.js";
|
||||
const WCV3ProductsArgsSchema = object({
|
||||
// Date ISO8601
|
||||
|
|
@ -143,6 +143,7 @@ const WCV3ProductSchema = object({
|
|||
post_password: string(),
|
||||
price: string(),
|
||||
price_html: string(),
|
||||
prix_maximal: string(),
|
||||
purchasable: boolean(),
|
||||
purchase_note: string(),
|
||||
rating_count: pipe(number(), integer()),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { o as object, c as optional, e as enum_, s as string, b as array, a as pipe, k as maxValue, m as minValue, n as number, i as integer, d as boolean, u as unknown, g as union, h as null_ } from "./index.BueHQ6RV.js";
|
||||
import { o as object, c as optional, e as enum_, s as string, b as array, a as pipe, k as maxValue, m as minValue, n as number, i as integer, d as boolean, u as unknown, g as union, h as null_ } from "./index.vOxCZRxB.js";
|
||||
import { P as PRODUCT_TYPES, T as TAG_OPERATORS, S as STOCK_STATUSES, R as RATINGS, O as ORDERBY_VALUES, b as ORDER_VALUES, D as DATE_COLUMN_VALUES, c as PRODUCTS_CONTEXTES, C as CATEGORY_OPERATORS, d as CATALOG_VISIBILITIES, A as ATTRIBUTES_RELATIONS } from "./products2.js";
|
||||
object({
|
||||
// Date ISO8601
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { p as parse } from "./index.BueHQ6RV.js";
|
||||
import { p as parse } from "./index.vOxCZRxB.js";
|
||||
import { E as ENTETE_WC_NONCE } from "./api.js";
|
||||
import { b as leveBadRequestError, c as leveUnauthorizedError, d as leveNotFoundError, E as ErreurInconnue, a as leveErreur } from "./erreurs.js";
|
||||
import { e as estWCError } from "./erreurs2.js";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { p as pipe } from "./pipe.XPB0wEfw.js";
|
|||
import "./erreurs.js";
|
||||
import "./exports.DT-46nyp.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
import "./index.BueHQ6RV.js";
|
||||
import "./index.vOxCZRxB.js";
|
||||
import "./messages2.js";
|
||||
import "./cart.js";
|
||||
import "./cart2.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { p as parse } from "./index.BueHQ6RV.js";
|
||||
import { p as parse } from "./index.vOxCZRxB.js";
|
||||
import { R as ROUTE_API_NOUVELLE_PRODUCTS } from "./api.js";
|
||||
import { g as SELECTEUR_GRILLE_PRODUITS, h as SELECTEUR_BOUTON_PLUS_PRODUITS, i as ATTRIBUT_ID_CATEGORIE_PRODUITS, j as ATTRIBUT_PAGE, k as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { h as html } from "./dom2.js";
|
||||
|
|
@ -77,7 +77,7 @@ const initialisePageBoutique = () => {
|
|||
<a href="${produit.permalink}">${produit.name}</a>
|
||||
</h3>
|
||||
<p class="produit__textuel__prix">
|
||||
${produit.price}€
|
||||
${produit.prix_maximal}€
|
||||
</p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from "./index.CeK6pfoJ.js";
|
||||
import { p as parse, V as ValiError } from "./index.BueHQ6RV.js";
|
||||
import { p as parse, V as ValiError } from "./index.vOxCZRxB.js";
|
||||
import { a as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER, c as ROUTE_API_MAJ_CLIENT, d as ROUTE_API_NOUVELLE_COMMANDES } from "./api.js";
|
||||
import { l as SELECTEUR_ENTREES_PANIER, m as SELECTEUR_CONTENEUR_PANIER, n as SELECTEUR_SOUS_TOTAL_PRODUITS, o as SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT, p as SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE, q as SELECTEUR_TOTAL_PANIER, r as SELECTEUR_BOUTON_SEPARATION_ADRESSES, s as SELECTEUR_FORMULAIRE_PANIER, t as SELECTEUR_FORMULAIRE_FACTURATION, u as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, v as ATTRIBUT_CLE_PANIER, w as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, x as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, y as SELECTEUR_BOUTON_ADDITION_QUANTITE, z as SELECTEUR_BOUTON_SUPPRESSION_PANIER, B as ATTRIBUT_DESACTIVE, A as ATTRIBUT_CONTIENT_ARTICLES, C as SELECTEUR_PRIX_LIGNE_PANIER, k as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { p as pipe } from "./pipe.XPB0wEfw.js";
|
|||
import { l } from "./index-0eef19ec.CFsloYN6.js";
|
||||
import { M as Maybe } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.DT-46nyp.js";
|
||||
import "./index.BueHQ6RV.js";
|
||||
import "./index.vOxCZRxB.js";
|
||||
import "./messages3.js";
|
||||
import "./messages2.js";
|
||||
import "./erreurs2.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { p as parse } from "./index.BueHQ6RV.js";
|
||||
import { p as parse } from "./index.vOxCZRxB.js";
|
||||
import { E as Either } from "./Either.wHNxn7Os.js";
|
||||
const eitherParse = (valeur, schema) => Either.encase(() => parse(schema, valeur));
|
||||
export {
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ function enregistre_personnalisations_theme($wp_customize) {
|
|||
add_action("customize_register", "enregistre_personnalisations_theme");
|
||||
|
||||
function retire_tailles_image_par_defaut($sizes) {
|
||||
$targets = [""];
|
||||
$targets = ["full", "thumbnail"];
|
||||
|
||||
foreach ($sizes as $size_index => $size) {
|
||||
if (!in_array($size, $targets)) {
|
||||
|
|
|
|||
|
|
@ -7,19 +7,20 @@ declare(strict_types=1);
|
|||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Roots\WPConfig\Config;
|
||||
use Stripe\BillingPortal\Session;
|
||||
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
|
||||
// Récupère les informations nécessaires
|
||||
/** @var WC_Session_Handler */
|
||||
/** @var WC_Session_Handler $session_wc */
|
||||
$session_wc = WC()->session;
|
||||
/** @var bool */
|
||||
/** @var bool $possede_session_wc */
|
||||
$possede_session_wc = $session_wc->has_session();
|
||||
/** @var string */
|
||||
/** @var string $url_accueil */
|
||||
$url_accueil = get_page_link(get_page_by_path("home")->ID);
|
||||
/** @var string */
|
||||
/** @var string $url_succes_commande */
|
||||
$url_succes_commande = get_page_link(get_page_by_path("successful-order"));
|
||||
/** @var string */
|
||||
/** @var string $url_echec_commande */
|
||||
$url_echec_commande = get_page_link(get_page_by_path("failed-order"));
|
||||
|
||||
// Retourne une 403 si l'Utilisateur n'a pas de session WooCommerce
|
||||
|
|
@ -30,21 +31,21 @@ if (!$possede_session_wc) {
|
|||
return;
|
||||
}
|
||||
|
||||
/** @var bool */
|
||||
$panier_vide = WC()->cart->is_empty();
|
||||
/** @var bool $est_panier__vide */
|
||||
$est_panier_vide = WC()->cart->is_empty();
|
||||
|
||||
// Redirige à la page d'accueil si le Panier est vide
|
||||
if ($panier_vide) {
|
||||
if ($est_panier_vide) {
|
||||
header("Location: $url_accueil");
|
||||
return;
|
||||
}
|
||||
|
||||
// Récupère le Panier et l'Email du Client
|
||||
/** @var WC_Cart */
|
||||
/** @var WC_Cart $panier */
|
||||
$panier = WC()->cart;
|
||||
/** @var string */
|
||||
/** @var string $email_client */
|
||||
$email_client = WC()->session->get("customer")["email"];
|
||||
/** @var mixed */
|
||||
/** @var mixed $articles */
|
||||
$articles = [];
|
||||
|
||||
foreach ($panier->get_cart() as $cle_panier => $article_panier) {
|
||||
|
|
@ -54,7 +55,6 @@ foreach ($panier->get_cart() as $cle_panier => $article_panier) {
|
|||
$titre_variation_formatte = $est_variation ? " (" . $titre_variation . ")" : "";
|
||||
|
||||
array_push($articles, [
|
||||
"quantity" => $article_panier["quantity"],
|
||||
"price_data" => [
|
||||
"currency" => "EUR",
|
||||
"product_data" => [
|
||||
|
|
@ -63,9 +63,11 @@ foreach ($panier->get_cart() as $cle_panier => $article_panier) {
|
|||
],
|
||||
"unit_amount" => $article_panier["data"]?->get_price() * 100,
|
||||
],
|
||||
"quantity" => $article_panier["quantity"],
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var string $order_id */
|
||||
$order_id = $_GET["order_id"];
|
||||
if (!$order_id) {
|
||||
$reponse = ["succes" => false, "status" => "order_key is missing"];
|
||||
|
|
@ -73,6 +75,8 @@ if (!$order_id) {
|
|||
http_response_code(400);
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var string $order_key */
|
||||
$order_key = $_GET["order_key"];
|
||||
if (!$order_key) {
|
||||
$reponse = ["succes" => false, "status" => "order_key is missing"];
|
||||
|
|
@ -80,8 +84,10 @@ if (!$order_key) {
|
|||
http_response_code(400);
|
||||
return;
|
||||
}
|
||||
/** @var WC_Order */
|
||||
|
||||
/** @var WC_Order $order */
|
||||
$order = wc_get_order($order_id);
|
||||
/** @var mixed $methode_livraison */
|
||||
$methode_livraison = [
|
||||
"nom" => $order->get_shipping_method(),
|
||||
"cout" => $order->get_shipping_total(),
|
||||
|
|
@ -90,6 +96,7 @@ $methode_livraison = [
|
|||
// Sélectionne la clé API Stripe
|
||||
\Stripe\Stripe::setApiKey(Config::get("STRIPE_API_SECRET"));
|
||||
|
||||
/** @var Session $session_checkout_stripe */
|
||||
$session_checkout_stripe = \Stripe\Checkout\Session::create(
|
||||
[
|
||||
"cancel_url" => "$url_accueil",
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@ $url_accueil = get_page_link(get_page_by_path("home")->ID);
|
|||
|
||||
/** @var string $session_id L'ID de la Session Stripe liée à la Commande. */
|
||||
$session_id = $_GET["session_id"];
|
||||
|
||||
// Redirige à l'Accueil si le paramètre d'ID de Session Stripe n'est pas présent
|
||||
// Redirige à l'Accueil si le paramètre d'ID de Session Stripe n'est pas présent avec un code HTTP 301
|
||||
if (!$session_id) {
|
||||
// Retourne un code HTTP 301
|
||||
header("Location: $url_accueil");
|
||||
return;
|
||||
}
|
||||
|
|
@ -81,6 +79,22 @@ try {
|
|||
},
|
||||
),
|
||||
);
|
||||
$produits_l = collect($commande->get_items())->map(function (WC_Order_Item $produit_commande) {
|
||||
/** @var string $id_produit L'ID du Produit. */
|
||||
$id_produit = $produit_commande["product_id"];
|
||||
/** @var WC_Product|false $produit Les informations du Produit. */
|
||||
$produit = wc_get_product($produit_commande["product_id"]);
|
||||
|
||||
return [
|
||||
"attributs" => recupere_et_formate_attributs_produit($produit->get_attributes()),
|
||||
"id_produit" => $id_produit,
|
||||
"image" => pipe($produit->get_image_id(), fn($id) => genere_balise_img_multiformats(id: $id, lazy: true)),
|
||||
"permalien" => $produit->get_permalink(),
|
||||
"prix" => $produit_commande->get_data()["total"],
|
||||
"quantite" => $produit_commande->get_quantity(),
|
||||
"titre" => $produit->get_title(),
|
||||
];
|
||||
});
|
||||
|
||||
$contexte["produits"] = $produits;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ $modeles = ["produit.twig"];
|
|||
|
||||
/** @var WC_Product $produit */
|
||||
$produit = wc_get_product();
|
||||
/** @var mixed $donnes_produit */
|
||||
/** @var mixed $donnees_produit */
|
||||
$donnees_produit = recupere_informations_produit_page_produit(wc_get_product());
|
||||
|
||||
/** @var bool $est_variation Le Produit est-il Variable (possède-t-il des variations ?) */
|
||||
|
|
@ -32,7 +32,7 @@ $variations_produit = pipe(
|
|||
fn($variations) => array_map(
|
||||
callback: function ($variation) {
|
||||
return [
|
||||
"id" => $variation->get_variation_id(),
|
||||
"id" => $variation->get_id(),
|
||||
// Ne récupère que le titre de l'Attribut unique de la Variation
|
||||
"titre" => match (true) {
|
||||
$variation->get_attribute("pa_side") !== "" => $variation->get_attribute("pa_side"),
|
||||
|
|
@ -54,6 +54,12 @@ $produits_meme_collection = array_map(
|
|||
array: recupere_produits_meme_collection($donnees_produit["collection"])($donnees_produit["id"]),
|
||||
);
|
||||
|
||||
// Déboguage en cas d'images fantômes
|
||||
// echo "<br><br><br><br><pre>";
|
||||
// print_r($produit->get_meta_data());
|
||||
// print_r($variations_produit);
|
||||
// echo "</pre>";
|
||||
|
||||
$contexte["produit"] = $donnees_produit;
|
||||
$contexte["prix_maximal"] = $prix_maximal;
|
||||
$contexte["variations_produit"] = $variations_produit;
|
||||
|
|
|
|||
|
|
@ -157,6 +157,35 @@ function genere_balises_img_dans_produit_dans_reponse_rest($response, $product)
|
|||
}
|
||||
add_filter("woocommerce_rest_prepare_product_object", "genere_balises_img_dans_produit_dans_reponse_rest", 10, 2);
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @param WP_REST_Respone $$reponse
|
||||
* @param WC_Data $produit
|
||||
* @return WP_REST_Response
|
||||
*/
|
||||
function genere_prix_maximal_produit_variable_dans_reponse_rest($reponse, $produit) {
|
||||
// Vérifie que la Réponse a des données
|
||||
if (empty($reponse->data)) {
|
||||
return $reponse;
|
||||
}
|
||||
|
||||
// Si le Produit n'est pas Variable, assigner le prix du Produit comme prix maximal
|
||||
if ($reponse->data["type"] != "variable") {
|
||||
$reponse->data["prix_maximal"] = $reponse->data["regular_price"];
|
||||
return $reponse;
|
||||
}
|
||||
|
||||
// Assigne le prix de la Variation la plus chère dans la Réponse
|
||||
$reponse->data["prix_maximal"] = collect($reponse->data["variations"])
|
||||
->map(fn($id) => wc_get_product($id))
|
||||
->map(fn($p) => $p->get_price())
|
||||
->max();
|
||||
|
||||
return $reponse;
|
||||
}
|
||||
add_filter("woocommerce_rest_prepare_product_object", "genere_prix_maximal_produit_variable_dans_reponse_rest", 10, 2);
|
||||
|
||||
add_action("add_meta_boxes", "desactive_champs_admin_images_produit_woocommerce", 40);
|
||||
add_action("after_setup_theme", "desactive_images_produit_woocommerce");
|
||||
add_action("enqueue_block_assets", "desactive_blocs_gutenberg_woocommerce");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
use function Crell\fp\pipe;
|
||||
use function Functional\sort;
|
||||
|
||||
/* Page Shop */
|
||||
|
||||
|
|
@ -21,7 +20,7 @@ function genere_balise_img_multiformats($id, $lazy = false) {
|
|||
return "";
|
||||
}
|
||||
|
||||
$url = wp_get_attachment_image_url($id);
|
||||
$url = wp_get_attachment_image_url($id, "full");
|
||||
$chemin = realpath(get_attached_file($id)) ? realpath(get_attached_file($id)) : "";
|
||||
$alt = get_post_meta($id, "_wp_attachment_image_alt", true);
|
||||
$dimensions = $chemin ? getimagesize($chemin) : ["", ""];
|
||||
|
|
@ -100,9 +99,11 @@ function recupere_informations_produit_shop($produit) {
|
|||
// Récupère les informations de chaque Variation
|
||||
fn($enfants) => array_map(callback: fn($id) => wc_get_product($id), array: $enfants),
|
||||
// Trie les Variations par prix descendant
|
||||
fn($variations) => sort(collection: $variations, callback: "tri_variations_par_prix_descendant"),
|
||||
// Récupère le Prix pour la Variation la plus chère (la première dans le tableau) OU le prix du Produit simple
|
||||
fn($variations_triees) => isset($variations_triees[0]) ? $variations_triees[0]->get_price() : $produit->get_price(),
|
||||
fn($variations) => array_map(callback: fn($variation) => $variation->get_price(), array: $variations),
|
||||
// Récupère le Prix de la Variation la plus chère
|
||||
fn($prix) => collect($prix)->max(),
|
||||
// Récupère le Prix pour la Variation la plus chère OU le prix du Produit simple
|
||||
fn($prix_variation_maximale) => isset($prix_variation_maximale) ? $prix_variation_maximale : $produit->get_price(),
|
||||
);
|
||||
|
||||
return [
|
||||
|
|
@ -130,8 +131,7 @@ function recupere_informations_produit_shop($produit) {
|
|||
/* Page Produit */
|
||||
|
||||
/**
|
||||
* Retourne un tableau associatif des informations affichées sur la page Produit depuis les
|
||||
* données brutes d'un Produit.
|
||||
* Retourne un tableau associatif des informations affichées sur la page Produit depuis les données brutes d'un Produit.
|
||||
*
|
||||
* @param mixed $donnees_produit
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -41,8 +41,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
&__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: var(--espace-xl);
|
||||
font-style: normal;
|
||||
|
||||
p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
}
|
||||
|
||||
&__rappel-commande {
|
||||
display: flex;
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
flex-flow: column nowrap;
|
||||
|
||||
&__produit {
|
||||
|
|
@ -51,6 +67,10 @@
|
|||
grid-template-rows: 1fr;
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
|
||||
&:only-child, &:last-of-type {
|
||||
border-bottom: initial;
|
||||
}
|
||||
|
||||
// Illustration du Produit
|
||||
&__illustratif {
|
||||
padding: var(--espace-l);
|
||||
|
|
@ -109,20 +129,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
&__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: var(--espace-xl);
|
||||
font-style: normal;
|
||||
|
||||
p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (width <= 50rem) {
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ export const WCV3ProductSchema = v.object({
|
|||
post_password: v.string(),
|
||||
price: v.string(),
|
||||
price_html: v.string(),
|
||||
prix_maximal: v.string(),
|
||||
purchasable: v.boolean(),
|
||||
purchase_note: v.string(),
|
||||
rating_count: v.pipe(v.number(), v.integer()),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import type { InferOutput } from "valibot";
|
||||
|
||||
import type { WCV3OrdersArgsSchema, WCV3OrderSchema } from "../../../schemas/api/v3/orders.ts";
|
||||
import type { WCV3OrdersArgsSchema } from "../../../schemas/api/v3/orders.ts";
|
||||
|
||||
export type WCV3OrdersArgs = InferOutput<typeof WCV3OrdersArgsSchema>;
|
||||
export type WCV3Order = InferOutput<typeof WCV3OrderSchema>;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
import type { InferOutput } from "valibot";
|
||||
|
||||
import type {
|
||||
WCV3ProductsArgsSchema,
|
||||
WCV3ProductSchema,
|
||||
WCV3ProductsSchema,
|
||||
} from "../../../schemas/api/v3/products.ts";
|
||||
import type { WCV3ProductsArgsSchema, WCV3ProductsSchema } from "../../../schemas/api/v3/products.ts";
|
||||
|
||||
export type WCV3Product = InferOutput<typeof WCV3ProductSchema>;
|
||||
export type WCV3Products = InferOutput<typeof WCV3ProductsSchema>;
|
||||
|
||||
export type WCV3ProductsArgs = InferOutput<typeof WCV3ProductsArgsSchema>;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ const initialisePageBoutique = (): void => {
|
|||
<a href="${produit.permalink}">${produit.name}</a>
|
||||
</h3>
|
||||
<p class="produit__textuel__prix">
|
||||
${produit.price}€
|
||||
${produit.prix_maximal}€
|
||||
</p>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
|
|
|||
|
|
@ -55,8 +55,7 @@ type EnsembleLienContenu = [HTMLAnchorElement, HTMLElement];
|
|||
const ETATS_PAGE: EtatsPage = _etats;
|
||||
|
||||
/**
|
||||
* Déplie toutes les sections de la Boîte des Informations Produit en ajustant les attributs
|
||||
* correspondants.
|
||||
* Fonction utilitaire pour déplier toutes les sections de la Boîte des Informations Produit, en ajustant les attributs correspondants.
|
||||
*/
|
||||
const deplieToutesSections = (ensembleLiensContenus: Array<EnsembleLienContenu>): void => {
|
||||
ensembleLiensContenus.forEach(ensemble => {
|
||||
|
|
@ -78,7 +77,6 @@ const SELECTEUR_VARIATION: Either<SyntaxError, HTMLSelectElement> = recupereElem
|
|||
const PRIX_PRODUIT: HTMLParagraphElement = recupereElementDansDocumentOuLeve<HTMLParagraphElement>(
|
||||
SELECTEUR_PRIX_PRODUIT,
|
||||
);
|
||||
|
||||
/** */
|
||||
const LIENS_ONGLETS: Array<HTMLAnchorElement> = pipe(
|
||||
recupereElementsDocumentEither<HTMLAnchorElement>(SELECTEUR_LIENS_ONGLETS),
|
||||
|
|
@ -208,10 +206,11 @@ const gereBoiteInformationsProduit = (): void => {
|
|||
BOUTON_AJOUT_PANIER.addEventListener("click", _ => ajouteProduitAuPanier());
|
||||
};
|
||||
|
||||
// TODO: Traiter le cas des Produits avec variations
|
||||
const ajouteProduitAuPanier = () => {
|
||||
// État de chargement
|
||||
// Déclenche l'etat de chargement
|
||||
BOUTON_AJOUT_PANIER.textContent = "Adding...";
|
||||
|
||||
// Construis les arguments de la requête au backend
|
||||
const idProduit: string = SELECTEUR_VARIATION
|
||||
.map(selecteur => selecteur.value)
|
||||
.orDefault(String(ETATS_PAGE.idProduit));
|
||||
|
|
|
|||
|
|
@ -80,10 +80,7 @@
|
|||
</nav>
|
||||
|
||||
{# Bouton « Panier » avec l'indicateur de quantité de Produits #}
|
||||
<section
|
||||
class="compte-panier"
|
||||
hidden
|
||||
>
|
||||
<section class="compte-panier">
|
||||
<a
|
||||
class="lien-bouton"
|
||||
data-contient-articles="{{ articles_presents }}"
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
{% for variation in variations_produit %}
|
||||
<option
|
||||
data-prix="{{ variation.prix }}"
|
||||
value="{{ variation.valeur }}"
|
||||
value="{{ variation.id }}"
|
||||
>
|
||||
{{ variation.titre }}
|
||||
</option>
|
||||
|
|
@ -121,7 +121,6 @@
|
|||
{{ variations_produit|length > 1 ? "disabled" : "" }}
|
||||
id="bouton-ajout-panier"
|
||||
type="button"
|
||||
hidden
|
||||
>
|
||||
Add to cart
|
||||
</button>
|
||||
|
|
|
|||