2024-11-30
This commit is contained in:
parent
700299157c
commit
23146b62c0
61 changed files with 696 additions and 654 deletions
|
|
@ -6,7 +6,7 @@ DB_PASSWORD=""
|
||||||
DB_PREFIX=""
|
DB_PREFIX=""
|
||||||
|
|
||||||
# Node (development/production)
|
# Node (development/production)
|
||||||
NODE_ENV="development"
|
VITE_MODE="development"
|
||||||
|
|
||||||
# WordPress
|
# WordPress
|
||||||
WP_ENV="development"
|
WP_ENV="development"
|
||||||
|
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -11,6 +11,9 @@ web/wp
|
||||||
web/vendor
|
web/vendor
|
||||||
web/.htaccess
|
web/.htaccess
|
||||||
|
|
||||||
|
# Compilation
|
||||||
|
web/app/themes/haiku-atelier-2024/assets/js
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,16 @@
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/export": "error",
|
"import/export": "error",
|
||||||
|
"no-array-for-each": "off",
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
|
"no-magic-numbers": "warn",
|
||||||
"no-rest-spread-properties": "off",
|
"no-rest-spread-properties": "off",
|
||||||
"no-ternary": "off",
|
"no-ternary": "off",
|
||||||
"sort-imports": "off",
|
"sort-imports": "off",
|
||||||
"typescript/consistent-type-imports": "error"
|
"typescript/array-type": ["error", { "default": "generic", "readonly": "generic" }],
|
||||||
|
"typescript/consistent-type-imports": "error",
|
||||||
|
"prefer-await-to-then": "off",
|
||||||
|
"no-void": "off",
|
||||||
|
"no-optional-chaining": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
|
@ -18,6 +18,7 @@
|
||||||
"DERNIERE",
|
"DERNIERE",
|
||||||
"echec",
|
"echec",
|
||||||
"Ecoute",
|
"Ecoute",
|
||||||
|
"Eles",
|
||||||
"emet",
|
"emet",
|
||||||
"ENTETE",
|
"ENTETE",
|
||||||
"epingle",
|
"epingle",
|
||||||
|
|
@ -42,6 +43,7 @@
|
||||||
"idempotency",
|
"idempotency",
|
||||||
"leve",
|
"leve",
|
||||||
"methode",
|
"methode",
|
||||||
|
"methodes",
|
||||||
"mobily",
|
"mobily",
|
||||||
"multiformats",
|
"multiformats",
|
||||||
"paypal",
|
"paypal",
|
||||||
|
|
@ -54,12 +56,14 @@
|
||||||
"rafraichissement",
|
"rafraichissement",
|
||||||
"rapprochee",
|
"rapprochee",
|
||||||
"recalcul",
|
"recalcul",
|
||||||
|
"renseignables",
|
||||||
"reponse",
|
"reponse",
|
||||||
"requete",
|
"requete",
|
||||||
"resultat",
|
"resultat",
|
||||||
"selecteur",
|
"selecteur",
|
||||||
"selecteurs",
|
"selecteurs",
|
||||||
"Selectionne",
|
"Selectionne",
|
||||||
|
"Separees",
|
||||||
"Simplifiee",
|
"Simplifiee",
|
||||||
"souleve",
|
"souleve",
|
||||||
"specifiques",
|
"specifiques",
|
||||||
|
|
@ -69,6 +73,7 @@
|
||||||
"tete",
|
"tete",
|
||||||
"tseslint",
|
"tseslint",
|
||||||
"Vali",
|
"Vali",
|
||||||
|
"VALIDEE",
|
||||||
"validite",
|
"validite",
|
||||||
"Visibilite"
|
"Visibilite"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
1
TODO.md
1
TODO.md
|
|
@ -10,6 +10,7 @@
|
||||||
- Boutons
|
- Boutons
|
||||||
- Champs
|
- Champs
|
||||||
- Reporter toutes les erreurs
|
- Reporter toutes les erreurs
|
||||||
|
- Utiliser un polyfill pour BroadcastChannel
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
8
composer.lock
generated
8
composer.lock
generated
|
|
@ -6515,11 +6515,11 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "5.x-dev",
|
"dev-1.x": "1.x-dev",
|
||||||
"dev-4.x": "4.x-dev",
|
|
||||||
"dev-3.x": "3.x-dev",
|
|
||||||
"dev-2.x": "2.x-dev",
|
"dev-2.x": "2.x-dev",
|
||||||
"dev-1.x": "1.x-dev"
|
"dev-3.x": "3.x-dev",
|
||||||
|
"dev-4.x": "4.x-dev",
|
||||||
|
"dev-master": "5.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
|
||||||
12
package.json
12
package.json
|
|
@ -5,7 +5,7 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"packageManager": "pnpm@9.14.2",
|
"packageManager": "pnpm@9.14.4",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"scripts": { "knip": "knip", "test": "echo \"Error: no test specified\" && exit 1" },
|
"scripts": { "knip": "knip", "test": "echo \"Error: no test specified\" && exit 1" },
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.9.4",
|
"@biomejs/biome": "^1.9.4",
|
||||||
"@eslint/js": "^9.15.0",
|
"@eslint/js": "^9.16.0",
|
||||||
"@prettier/plugin-php": "^0.22.2",
|
"@prettier/plugin-php": "^0.22.2",
|
||||||
"@prettier/plugin-xml": "^3.4.1",
|
"@prettier/plugin-xml": "^3.4.1",
|
||||||
"@sentry/types": "8.41.0",
|
"@sentry/types": "8.41.0",
|
||||||
|
|
@ -30,12 +30,12 @@
|
||||||
"@types/node": "^22.10.1",
|
"@types/node": "^22.10.1",
|
||||||
"better-typescript-lib": "^2.9.0",
|
"better-typescript-lib": "^2.9.0",
|
||||||
"browserslist": "^4.24.2",
|
"browserslist": "^4.24.2",
|
||||||
"eslint": "^9.15.0",
|
"eslint": "^9.16.0",
|
||||||
"eslint-plugin-oxlint": "^0.13.2",
|
"eslint-plugin-oxlint": "^0.13.2",
|
||||||
"eslint-plugin-perfectionist": "^4.1.2",
|
"eslint-plugin-perfectionist": "^4.1.2",
|
||||||
"fdir": "^6.4.2",
|
"fdir": "^6.4.2",
|
||||||
"globals": "^15.12.0",
|
"globals": "^15.12.0",
|
||||||
"knip": "^5.38.2",
|
"knip": "^5.38.3",
|
||||||
"oxlint": "^0.13.2",
|
"oxlint": "^0.13.2",
|
||||||
"picomatch": "^4.0.2",
|
"picomatch": "^4.0.2",
|
||||||
"prettier": "^3.4.1",
|
"prettier": "^3.4.1",
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
"stylelint": "^16.11.0",
|
"stylelint": "^16.11.0",
|
||||||
"stylelint-config-clean-order": "^6.1.0",
|
"stylelint-config-clean-order": "^6.1.0",
|
||||||
"stylelint-config-sass-guidelines": "^12.1.0",
|
"stylelint-config-sass-guidelines": "^12.1.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0",
|
"stylelint-config-standard-scss": "^14.0.0",
|
||||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||||
"stylelint-plugin-logical-css": "^1.2.1",
|
"stylelint-plugin-logical-css": "^1.2.1",
|
||||||
"typescript": "5.8.0-dev.20241122",
|
"typescript": "5.8.0-dev.20241122",
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
"vite": "^6.0.1",
|
"vite": "^6.0.1",
|
||||||
"vite-plugin-manifest-sri": "^0.2.0",
|
"vite-plugin-manifest-sri": "^0.2.0",
|
||||||
"vite-plugin-node-polyfills": "^0.22.0",
|
"vite-plugin-node-polyfills": "^0.22.0",
|
||||||
"vite-plugin-valibot-env": "^0.9.1",
|
"vite-plugin-valibot-env": "^0.9.2",
|
||||||
"vite-tsconfig-paths": "^5.1.3",
|
"vite-tsconfig-paths": "^5.1.3",
|
||||||
"wp-types": "^4.67.0"
|
"wp-types": "^4.67.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
293
pnpm-lock.yaml
generated
293
pnpm-lock.yaml
generated
|
|
@ -37,8 +37,8 @@ importers:
|
||||||
specifier: ^1.9.4
|
specifier: ^1.9.4
|
||||||
version: 1.9.4
|
version: 1.9.4
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
specifier: ^9.15.0
|
specifier: ^9.16.0
|
||||||
version: 9.15.0
|
version: 9.16.0
|
||||||
'@prettier/plugin-php':
|
'@prettier/plugin-php':
|
||||||
specifier: ^0.22.2
|
specifier: ^0.22.2
|
||||||
version: 0.22.2(prettier@3.4.1)
|
version: 0.22.2(prettier@3.4.1)
|
||||||
|
|
@ -64,14 +64,14 @@ importers:
|
||||||
specifier: ^4.24.2
|
specifier: ^4.24.2
|
||||||
version: 4.24.2
|
version: 4.24.2
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.15.0
|
specifier: ^9.16.0
|
||||||
version: 9.15.0(jiti@2.4.1)
|
version: 9.16.0(jiti@2.4.1)
|
||||||
eslint-plugin-oxlint:
|
eslint-plugin-oxlint:
|
||||||
specifier: ^0.13.2
|
specifier: ^0.13.2
|
||||||
version: 0.13.2
|
version: 0.13.2
|
||||||
eslint-plugin-perfectionist:
|
eslint-plugin-perfectionist:
|
||||||
specifier: ^4.1.2
|
specifier: ^4.1.2
|
||||||
version: 4.1.2(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
version: 4.1.2(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
fdir:
|
fdir:
|
||||||
specifier: ^6.4.2
|
specifier: ^6.4.2
|
||||||
version: 6.4.2(picomatch@4.0.2)
|
version: 6.4.2(picomatch@4.0.2)
|
||||||
|
|
@ -79,8 +79,8 @@ importers:
|
||||||
specifier: ^15.12.0
|
specifier: ^15.12.0
|
||||||
version: 15.12.0
|
version: 15.12.0
|
||||||
knip:
|
knip:
|
||||||
specifier: ^5.38.2
|
specifier: ^5.38.3
|
||||||
version: 5.38.2(@types/node@22.10.1)(typescript@5.8.0-dev.20241122)
|
version: 5.38.3(@types/node@22.10.1)(typescript@5.8.0-dev.20241122)
|
||||||
oxlint:
|
oxlint:
|
||||||
specifier: ^0.13.2
|
specifier: ^0.13.2
|
||||||
version: 0.13.2
|
version: 0.13.2
|
||||||
|
|
@ -109,8 +109,8 @@ importers:
|
||||||
specifier: ^12.1.0
|
specifier: ^12.1.0
|
||||||
version: 12.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
version: 12.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
||||||
stylelint-config-standard-scss:
|
stylelint-config-standard-scss:
|
||||||
specifier: ^13.1.0
|
specifier: ^14.0.0
|
||||||
version: 13.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
version: 14.0.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
||||||
stylelint-declaration-block-no-ignored-properties:
|
stylelint-declaration-block-no-ignored-properties:
|
||||||
specifier: ^2.8.0
|
specifier: ^2.8.0
|
||||||
version: 2.8.0(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
version: 2.8.0(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
||||||
|
|
@ -122,7 +122,7 @@ importers:
|
||||||
version: 5.8.0-dev.20241122
|
version: 5.8.0-dev.20241122
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.16.0
|
specifier: ^8.16.0
|
||||||
version: 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
version: 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^6.0.1
|
specifier: ^6.0.1
|
||||||
version: 6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)
|
version: 6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)
|
||||||
|
|
@ -131,10 +131,10 @@ importers:
|
||||||
version: 0.2.0
|
version: 0.2.0
|
||||||
vite-plugin-node-polyfills:
|
vite-plugin-node-polyfills:
|
||||||
specifier: ^0.22.0
|
specifier: ^0.22.0
|
||||||
version: 0.22.0(rollup@4.27.4)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
version: 0.22.0(rollup@4.28.0)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
||||||
vite-plugin-valibot-env:
|
vite-plugin-valibot-env:
|
||||||
specifier: ^0.9.1
|
specifier: ^0.9.2
|
||||||
version: 0.9.1(valibot@1.0.0-beta.9(typescript@5.8.0-dev.20241122))(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
version: 0.9.2(valibot@1.0.0-beta.9(typescript@5.8.0-dev.20241122))(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
||||||
vite-tsconfig-paths:
|
vite-tsconfig-paths:
|
||||||
specifier: ^5.1.3
|
specifier: ^5.1.3
|
||||||
version: 5.1.3(typescript@5.8.0-dev.20241122)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
version: 5.1.3(typescript@5.8.0-dev.20241122)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6))
|
||||||
|
|
@ -487,8 +487,8 @@ packages:
|
||||||
resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==}
|
resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/js@9.15.0':
|
'@eslint/js@9.16.0':
|
||||||
resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==}
|
resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.4':
|
'@eslint/object-schema@2.1.4':
|
||||||
|
|
@ -788,93 +788,93 @@ packages:
|
||||||
rollup:
|
rollup:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-android-arm-eabi@4.27.4':
|
'@rollup/rollup-android-arm-eabi@4.28.0':
|
||||||
resolution: {integrity: sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==}
|
resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [android]
|
os: [android]
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.27.4':
|
'@rollup/rollup-android-arm64@4.28.0':
|
||||||
resolution: {integrity: sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==}
|
resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [android]
|
os: [android]
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.27.4':
|
'@rollup/rollup-darwin-arm64@4.28.0':
|
||||||
resolution: {integrity: sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==}
|
resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.27.4':
|
'@rollup/rollup-darwin-x64@4.28.0':
|
||||||
resolution: {integrity: sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==}
|
resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.27.4':
|
'@rollup/rollup-freebsd-arm64@4.28.0':
|
||||||
resolution: {integrity: sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==}
|
resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.27.4':
|
'@rollup/rollup-freebsd-x64@4.28.0':
|
||||||
resolution: {integrity: sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==}
|
resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.27.4':
|
'@rollup/rollup-linux-arm-gnueabihf@4.28.0':
|
||||||
resolution: {integrity: sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==}
|
resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.27.4':
|
'@rollup/rollup-linux-arm-musleabihf@4.28.0':
|
||||||
resolution: {integrity: sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==}
|
resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.27.4':
|
'@rollup/rollup-linux-arm64-gnu@4.28.0':
|
||||||
resolution: {integrity: sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==}
|
resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.27.4':
|
'@rollup/rollup-linux-arm64-musl@4.28.0':
|
||||||
resolution: {integrity: sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==}
|
resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.27.4':
|
'@rollup/rollup-linux-powerpc64le-gnu@4.28.0':
|
||||||
resolution: {integrity: sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==}
|
resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==}
|
||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.27.4':
|
'@rollup/rollup-linux-riscv64-gnu@4.28.0':
|
||||||
resolution: {integrity: sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==}
|
resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.27.4':
|
'@rollup/rollup-linux-s390x-gnu@4.28.0':
|
||||||
resolution: {integrity: sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==}
|
resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.27.4':
|
'@rollup/rollup-linux-x64-gnu@4.28.0':
|
||||||
resolution: {integrity: sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==}
|
resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.27.4':
|
'@rollup/rollup-linux-x64-musl@4.28.0':
|
||||||
resolution: {integrity: sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==}
|
resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.27.4':
|
'@rollup/rollup-win32-arm64-msvc@4.28.0':
|
||||||
resolution: {integrity: sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==}
|
resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.27.4':
|
'@rollup/rollup-win32-ia32-msvc@4.28.0':
|
||||||
resolution: {integrity: sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==}
|
resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==}
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.27.4':
|
'@rollup/rollup-win32-x64-msvc@4.28.0':
|
||||||
resolution: {integrity: sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==}
|
resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
|
|
@ -1537,8 +1537,8 @@ packages:
|
||||||
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
|
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
eslint@9.15.0:
|
eslint@9.16.0:
|
||||||
resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==}
|
resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|
@ -1730,8 +1730,9 @@ packages:
|
||||||
globrex@0.1.2:
|
globrex@0.1.2:
|
||||||
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
|
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
|
||||||
|
|
||||||
gopd@1.0.1:
|
gopd@1.1.0:
|
||||||
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
|
resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==}
|
||||||
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
got@13.0.0:
|
got@13.0.0:
|
||||||
resolution: {integrity: sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==}
|
resolution: {integrity: sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==}
|
||||||
|
|
@ -1945,8 +1946,8 @@ packages:
|
||||||
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
|
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
knip@5.38.2:
|
knip@5.38.3:
|
||||||
resolution: {integrity: sha512-gVduAQa80bar/uKtQDvOCBzTApdjqiz8e9eDIdRkYFyTAQM/DriWLi2vv/2AlzMcPYeSWddLptBdgN4whGzFtg==}
|
resolution: {integrity: sha512-pg3CMzWlZy4mnuwxieGoK74oOgzFPvsUR/aE8NSqx2oQr56soXTzmw8GsHR277pU52Fe0h4/pho2PMhVeEvj8g==}
|
||||||
engines: {node: '>=18.6.0'}
|
engines: {node: '>=18.6.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|
@ -2369,8 +2370,8 @@ packages:
|
||||||
ripemd160@2.0.2:
|
ripemd160@2.0.2:
|
||||||
resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==}
|
resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==}
|
||||||
|
|
||||||
rollup@4.27.4:
|
rollup@4.28.0:
|
||||||
resolution: {integrity: sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==}
|
resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==}
|
||||||
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
|
@ -2668,12 +2669,12 @@ packages:
|
||||||
postcss: ^8.4.21
|
postcss: ^8.4.21
|
||||||
stylelint: ^16.1.0
|
stylelint: ^16.1.0
|
||||||
|
|
||||||
stylelint-config-standard-scss@13.1.0:
|
stylelint-config-standard-scss@14.0.0:
|
||||||
resolution: {integrity: sha512-Eo5w7/XvwGHWkeGLtdm2FZLOMYoZl1omP2/jgFCXyl2x5yNz7/8vv4Tj6slHvMSSUNTaGoam/GAZ0ZhukvalfA==}
|
resolution: {integrity: sha512-6Pa26D9mHyi4LauJ83ls3ELqCglU6VfCXchovbEqQUiEkezvKdv6VgsIoMy58i00c854wVmOw0k8W5FTpuaVqg==}
|
||||||
engines: {node: '>=18.12.0'}
|
engines: {node: '>=18.12.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
postcss: ^8.3.3
|
postcss: ^8.3.3
|
||||||
stylelint: ^16.3.1
|
stylelint: ^16.11.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
postcss:
|
postcss:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
@ -2868,12 +2869,12 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
|
vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
|
||||||
|
|
||||||
vite-plugin-valibot-env@0.9.1:
|
vite-plugin-valibot-env@0.9.2:
|
||||||
resolution: {integrity: sha512-ajlS8IHeML49kJMS9eAyko2laIlj07sMIMwtUiFjZ6tv/CiSW71GUthATur8XWYnm+qr3sszDFnNPDMDu8doTA==}
|
resolution: {integrity: sha512-eVScFRYYufR5q/QJf+Ayr9ckHgg2zNJDIMMP8qIawTUeInRhsI0Q7n0BnJmrS5lOMEM9VLZrEXnPTa9aTa/TvA==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
valibot: '>=0.30 <=0.42 || >=1.0.0-beta.0 <=1.0.0-beta.8'
|
valibot: '>=0.30 <2.0.0'
|
||||||
vite: '>=5 || >=6'
|
vite: '>=5 <7'
|
||||||
|
|
||||||
vite-tsconfig-paths@5.1.3:
|
vite-tsconfig-paths@5.1.3:
|
||||||
resolution: {integrity: sha512-0bz+PDlLpGfP2CigeSKL9NFTF1KtXkeHGZSSaGQSuPZH77GhoiQaA8IjYgOaynSuwlDTolSUEU0ErVvju3NURg==}
|
resolution: {integrity: sha512-0bz+PDlLpGfP2CigeSKL9NFTF1KtXkeHGZSSaGQSuPZH77GhoiQaA8IjYgOaynSuwlDTolSUEU0ErVvju3NURg==}
|
||||||
|
|
@ -3183,9 +3184,9 @@ snapshots:
|
||||||
'@esbuild/win32-x64@0.24.0':
|
'@esbuild/win32-x64@0.24.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@eslint-community/eslint-utils@4.4.1(eslint@9.15.0(jiti@2.4.1))':
|
'@eslint-community/eslint-utils@4.4.1(eslint@9.16.0(jiti@2.4.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
eslint-visitor-keys: 3.4.3
|
eslint-visitor-keys: 3.4.3
|
||||||
|
|
||||||
'@eslint-community/regexpp@4.12.1': {}
|
'@eslint-community/regexpp@4.12.1': {}
|
||||||
|
|
@ -3214,7 +3215,7 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@eslint/js@9.15.0': {}
|
'@eslint/js@9.16.0': {}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.4': {}
|
'@eslint/object-schema@2.1.4': {}
|
||||||
|
|
||||||
|
|
@ -3415,74 +3416,74 @@ snapshots:
|
||||||
'@xml-tools/parser': 1.0.11
|
'@xml-tools/parser': 1.0.11
|
||||||
prettier: 3.4.1
|
prettier: 3.4.1
|
||||||
|
|
||||||
'@rollup/plugin-inject@5.0.5(rollup@4.27.4)':
|
'@rollup/plugin-inject@5.0.5(rollup@4.28.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.1.3(rollup@4.27.4)
|
'@rollup/pluginutils': 5.1.3(rollup@4.28.0)
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
magic-string: 0.30.14
|
magic-string: 0.30.14
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.27.4
|
rollup: 4.28.0
|
||||||
|
|
||||||
'@rollup/pluginutils@5.1.3(rollup@4.27.4)':
|
'@rollup/pluginutils@5.1.3(rollup@4.28.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
picomatch: 4.0.2
|
picomatch: 4.0.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rollup: 4.27.4
|
rollup: 4.28.0
|
||||||
|
|
||||||
'@rollup/rollup-android-arm-eabi@4.27.4':
|
'@rollup/rollup-android-arm-eabi@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-android-arm64@4.27.4':
|
'@rollup/rollup-android-arm64@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-darwin-arm64@4.27.4':
|
'@rollup/rollup-darwin-arm64@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-darwin-x64@4.27.4':
|
'@rollup/rollup-darwin-x64@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-arm64@4.27.4':
|
'@rollup/rollup-freebsd-arm64@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-freebsd-x64@4.27.4':
|
'@rollup/rollup-freebsd-x64@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-gnueabihf@4.27.4':
|
'@rollup/rollup-linux-arm-gnueabihf@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.27.4':
|
'@rollup/rollup-linux-arm-musleabihf@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.27.4':
|
'@rollup/rollup-linux-arm64-gnu@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.27.4':
|
'@rollup/rollup-linux-arm64-musl@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.27.4':
|
'@rollup/rollup-linux-powerpc64le-gnu@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.27.4':
|
'@rollup/rollup-linux-riscv64-gnu@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.27.4':
|
'@rollup/rollup-linux-s390x-gnu@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.27.4':
|
'@rollup/rollup-linux-x64-gnu@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.27.4':
|
'@rollup/rollup-linux-x64-musl@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.27.4':
|
'@rollup/rollup-win32-arm64-msvc@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-ia32-msvc@4.27.4':
|
'@rollup/rollup-win32-ia32-msvc@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rollup/rollup-win32-x64-msvc@4.27.4':
|
'@rollup/rollup-win32-x64-msvc@4.28.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@sec-ant/readable-stream@0.4.1': {}
|
'@sec-ant/readable-stream@0.4.1': {}
|
||||||
|
|
@ -3637,15 +3638,15 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 6.20.0
|
undici-types: 6.20.0
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122))(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
'@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122))(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/regexpp': 4.12.1
|
'@eslint-community/regexpp': 4.12.1
|
||||||
'@typescript-eslint/parser': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.16.0
|
||||||
'@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.16.0
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
graphemer: 1.4.0
|
graphemer: 1.4.0
|
||||||
ignore: 5.3.2
|
ignore: 5.3.2
|
||||||
natural-compare: 1.4.0
|
natural-compare: 1.4.0
|
||||||
|
|
@ -3655,14 +3656,14 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
'@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.16.0
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.16.0
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.16.0
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.0-dev.20241122
|
typescript: 5.8.0-dev.20241122
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -3673,12 +3674,12 @@ snapshots:
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.16.0
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.16.0
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
'@typescript-eslint/type-utils@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
ts-api-utils: 1.4.3(typescript@5.8.0-dev.20241122)
|
ts-api-utils: 1.4.3(typescript@5.8.0-dev.20241122)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.0-dev.20241122
|
typescript: 5.8.0-dev.20241122
|
||||||
|
|
@ -3702,13 +3703,13 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
'@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.1))
|
'@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1))
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.16.0
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.16.0
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.8.0-dev.20241122)
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.0-dev.20241122
|
typescript: 5.8.0-dev.20241122
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -4144,7 +4145,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
es-define-property: 1.0.0
|
es-define-property: 1.0.0
|
||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
gopd: 1.0.1
|
gopd: 1.1.0
|
||||||
|
|
||||||
define-properties@1.2.1:
|
define-properties@1.2.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -4244,11 +4245,11 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
jsonc-parser: 3.3.1
|
jsonc-parser: 3.3.1
|
||||||
|
|
||||||
eslint-plugin-perfectionist@4.1.2(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122):
|
eslint-plugin-perfectionist@4.1.2(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.16.0
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
natural-orderby: 5.0.0
|
natural-orderby: 5.0.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
@ -4263,14 +4264,14 @@ snapshots:
|
||||||
|
|
||||||
eslint-visitor-keys@4.2.0: {}
|
eslint-visitor-keys@4.2.0: {}
|
||||||
|
|
||||||
eslint@9.15.0(jiti@2.4.1):
|
eslint@9.16.0(jiti@2.4.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.1))
|
'@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1))
|
||||||
'@eslint-community/regexpp': 4.12.1
|
'@eslint-community/regexpp': 4.12.1
|
||||||
'@eslint/config-array': 0.19.0
|
'@eslint/config-array': 0.19.0
|
||||||
'@eslint/core': 0.9.0
|
'@eslint/core': 0.9.0
|
||||||
'@eslint/eslintrc': 3.2.0
|
'@eslint/eslintrc': 3.2.0
|
||||||
'@eslint/js': 9.15.0
|
'@eslint/js': 9.16.0
|
||||||
'@eslint/plugin-kit': 0.2.3
|
'@eslint/plugin-kit': 0.2.3
|
||||||
'@humanfs/node': 0.16.6
|
'@humanfs/node': 0.16.6
|
||||||
'@humanwhocodes/module-importer': 1.0.1
|
'@humanwhocodes/module-importer': 1.0.1
|
||||||
|
|
@ -4489,7 +4490,7 @@ snapshots:
|
||||||
|
|
||||||
globrex@0.1.2: {}
|
globrex@0.1.2: {}
|
||||||
|
|
||||||
gopd@1.0.1:
|
gopd@1.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
get-intrinsic: 1.2.4
|
get-intrinsic: 1.2.4
|
||||||
|
|
||||||
|
|
@ -4666,7 +4667,7 @@ snapshots:
|
||||||
|
|
||||||
kleur@4.1.5: {}
|
kleur@4.1.5: {}
|
||||||
|
|
||||||
knip@5.38.2(@types/node@22.10.1)(typescript@5.8.0-dev.20241122):
|
knip@5.38.3(@types/node@22.10.1)(typescript@5.8.0-dev.20241122):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nodelib/fs.walk': 1.2.8
|
'@nodelib/fs.walk': 1.2.8
|
||||||
'@snyk/github-codeowners': 1.1.0
|
'@snyk/github-codeowners': 1.1.0
|
||||||
|
|
@ -5086,28 +5087,28 @@ snapshots:
|
||||||
hash-base: 3.0.5
|
hash-base: 3.0.5
|
||||||
inherits: 2.0.4
|
inherits: 2.0.4
|
||||||
|
|
||||||
rollup@4.27.4:
|
rollup@4.28.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@rollup/rollup-android-arm-eabi': 4.27.4
|
'@rollup/rollup-android-arm-eabi': 4.28.0
|
||||||
'@rollup/rollup-android-arm64': 4.27.4
|
'@rollup/rollup-android-arm64': 4.28.0
|
||||||
'@rollup/rollup-darwin-arm64': 4.27.4
|
'@rollup/rollup-darwin-arm64': 4.28.0
|
||||||
'@rollup/rollup-darwin-x64': 4.27.4
|
'@rollup/rollup-darwin-x64': 4.28.0
|
||||||
'@rollup/rollup-freebsd-arm64': 4.27.4
|
'@rollup/rollup-freebsd-arm64': 4.28.0
|
||||||
'@rollup/rollup-freebsd-x64': 4.27.4
|
'@rollup/rollup-freebsd-x64': 4.28.0
|
||||||
'@rollup/rollup-linux-arm-gnueabihf': 4.27.4
|
'@rollup/rollup-linux-arm-gnueabihf': 4.28.0
|
||||||
'@rollup/rollup-linux-arm-musleabihf': 4.27.4
|
'@rollup/rollup-linux-arm-musleabihf': 4.28.0
|
||||||
'@rollup/rollup-linux-arm64-gnu': 4.27.4
|
'@rollup/rollup-linux-arm64-gnu': 4.28.0
|
||||||
'@rollup/rollup-linux-arm64-musl': 4.27.4
|
'@rollup/rollup-linux-arm64-musl': 4.28.0
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu': 4.27.4
|
'@rollup/rollup-linux-powerpc64le-gnu': 4.28.0
|
||||||
'@rollup/rollup-linux-riscv64-gnu': 4.27.4
|
'@rollup/rollup-linux-riscv64-gnu': 4.28.0
|
||||||
'@rollup/rollup-linux-s390x-gnu': 4.27.4
|
'@rollup/rollup-linux-s390x-gnu': 4.28.0
|
||||||
'@rollup/rollup-linux-x64-gnu': 4.27.4
|
'@rollup/rollup-linux-x64-gnu': 4.28.0
|
||||||
'@rollup/rollup-linux-x64-musl': 4.27.4
|
'@rollup/rollup-linux-x64-musl': 4.28.0
|
||||||
'@rollup/rollup-win32-arm64-msvc': 4.27.4
|
'@rollup/rollup-win32-arm64-msvc': 4.28.0
|
||||||
'@rollup/rollup-win32-ia32-msvc': 4.27.4
|
'@rollup/rollup-win32-ia32-msvc': 4.28.0
|
||||||
'@rollup/rollup-win32-x64-msvc': 4.27.4
|
'@rollup/rollup-win32-x64-msvc': 4.28.0
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
run-parallel@1.2.0:
|
run-parallel@1.2.0:
|
||||||
|
|
@ -5241,7 +5242,7 @@ snapshots:
|
||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
function-bind: 1.1.2
|
function-bind: 1.1.2
|
||||||
get-intrinsic: 1.2.4
|
get-intrinsic: 1.2.4
|
||||||
gopd: 1.0.1
|
gopd: 1.1.0
|
||||||
has-property-descriptors: 1.0.2
|
has-property-descriptors: 1.0.2
|
||||||
|
|
||||||
setimmediate@1.0.5: {}
|
setimmediate@1.0.5: {}
|
||||||
|
|
@ -5376,7 +5377,7 @@ snapshots:
|
||||||
stylelint: 16.11.0(typescript@5.8.0-dev.20241122)
|
stylelint: 16.11.0(typescript@5.8.0-dev.20241122)
|
||||||
stylelint-scss: 6.10.0(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
stylelint-scss: 6.10.0(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
||||||
|
|
||||||
stylelint-config-standard-scss@13.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122)):
|
stylelint-config-standard-scss@14.0.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122)):
|
||||||
dependencies:
|
dependencies:
|
||||||
stylelint: 16.11.0(typescript@5.8.0-dev.20241122)
|
stylelint: 16.11.0(typescript@5.8.0-dev.20241122)
|
||||||
stylelint-config-recommended-scss: 14.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
stylelint-config-recommended-scss: 14.1.0(postcss@8.4.49)(stylelint@16.11.0(typescript@5.8.0-dev.20241122))
|
||||||
|
|
@ -5535,12 +5536,12 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
prelude-ls: 1.2.1
|
prelude-ls: 1.2.1
|
||||||
|
|
||||||
typescript-eslint@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122):
|
typescript-eslint@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122))(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122))(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/parser': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.8.0-dev.20241122)
|
||||||
eslint: 9.15.0(jiti@2.4.1)
|
eslint: 9.16.0(jiti@2.4.1)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.0-dev.20241122
|
typescript: 5.8.0-dev.20241122
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -5592,15 +5593,15 @@ snapshots:
|
||||||
|
|
||||||
vite-plugin-manifest-sri@0.2.0: {}
|
vite-plugin-manifest-sri@0.2.0: {}
|
||||||
|
|
||||||
vite-plugin-node-polyfills@0.22.0(rollup@4.27.4)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)):
|
vite-plugin-node-polyfills@0.22.0(rollup@4.28.0)(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/plugin-inject': 5.0.5(rollup@4.27.4)
|
'@rollup/plugin-inject': 5.0.5(rollup@4.28.0)
|
||||||
node-stdlib-browser: 1.3.0
|
node-stdlib-browser: 1.3.0
|
||||||
vite: 6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)
|
vite: 6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
|
|
||||||
vite-plugin-valibot-env@0.9.1(valibot@1.0.0-beta.9(typescript@5.8.0-dev.20241122))(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)):
|
vite-plugin-valibot-env@0.9.2(valibot@1.0.0-beta.9(typescript@5.8.0-dev.20241122))(vite@6.0.1(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.81.0)(sass@1.80.6)):
|
||||||
dependencies:
|
dependencies:
|
||||||
kleur: 4.1.5
|
kleur: 4.1.5
|
||||||
log-symbols: 7.0.0
|
log-symbols: 7.0.0
|
||||||
|
|
@ -5622,7 +5623,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.24.0
|
esbuild: 0.24.0
|
||||||
postcss: 8.4.49
|
postcss: 8.4.49
|
||||||
rollup: 4.27.4
|
rollup: 4.28.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/node': 22.10.1
|
'@types/node': 22.10.1
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
@ -5642,7 +5643,7 @@ snapshots:
|
||||||
available-typed-arrays: 1.0.7
|
available-typed-arrays: 1.0.7
|
||||||
call-bind: 1.0.7
|
call-bind: 1.0.7
|
||||||
for-each: 0.3.3
|
for-each: 0.3.3
|
||||||
gopd: 1.0.1
|
gopd: 1.1.0
|
||||||
has-tostringtag: 1.0.2
|
has-tostringtag: 1.0.2
|
||||||
|
|
||||||
which@1.3.1:
|
which@1.3.1:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import { fdir } from "fdir";
|
import { fdir } from "fdir";
|
||||||
import { resolve } from "node:path";
|
import { resolve } from "node:path";
|
||||||
|
import process from "node:process";
|
||||||
import * as v from "valibot";
|
import * as v from "valibot";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig, loadEnv } from "vite";
|
||||||
import manifestSRI from "vite-plugin-manifest-sri";
|
import manifestSRI from "vite-plugin-manifest-sri";
|
||||||
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||||
import valibot from "vite-plugin-valibot-env";
|
import valibot from "vite-plugin-valibot-env";
|
||||||
|
|
@ -17,41 +18,47 @@ const SRC_TYPESCRIPT_PATHS = new fdir()
|
||||||
/* Voir le fichier vite.env.d.ts */
|
/* Voir le fichier vite.env.d.ts */
|
||||||
const SCHEMA_ENVIRONNEMENT = v.object({
|
const SCHEMA_ENVIRONNEMENT = v.object({
|
||||||
VITE_GLITCHTIP_NSD: v.pipe(v.string(), v.url(), v.readonly()),
|
VITE_GLITCHTIP_NSD: v.pipe(v.string(), v.url(), v.readonly()),
|
||||||
|
VITE_MODE: v.pipe(v.string(), v.readonly()),
|
||||||
VITE_URL: v.pipe(v.string(), v.nonEmpty(), v.url(), v.readonly()),
|
VITE_URL: v.pipe(v.string(), v.nonEmpty(), v.url(), v.readonly()),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(async ({ mode }) => {
|
||||||
base: "/",
|
const env = loadEnv(mode, process.cwd(), "VITE");
|
||||||
build: {
|
|
||||||
assetsDir: ".",
|
return {
|
||||||
emptyOutDir: true,
|
base: "/",
|
||||||
/* Génère un fichier manifeste dans outDir */
|
build: {
|
||||||
manifest: true,
|
assetsDir: ".",
|
||||||
minify: true,
|
emptyOutDir: true,
|
||||||
outDir: resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
/* Génère un fichier manifeste dans outDir */
|
||||||
reportCompressedSize: true,
|
manifest: true,
|
||||||
rollupOptions: {
|
minify: env.VITE_MODE === "production",
|
||||||
input: await SRC_TYPESCRIPT_PATHS,
|
outDir: resolve("./web/app/themes/haiku-atelier-2024/assets/js"),
|
||||||
output: {
|
reportCompressedSize: true,
|
||||||
assetFileNames: "[name].[hash].[extname]",
|
rollupOptions: {
|
||||||
chunkFileNames: "[name].[hash].js",
|
input: await SRC_TYPESCRIPT_PATHS,
|
||||||
compact: true,
|
output: {
|
||||||
entryFileNames: "[name].js",
|
assetFileNames: "[name].[hash].[extname]",
|
||||||
validate: true,
|
chunkFileNames: "[name].[hash].js",
|
||||||
|
compact: env.VITE_MODE === "production",
|
||||||
|
entryFileNames: "[name].js",
|
||||||
|
validate: true,
|
||||||
|
},
|
||||||
|
treeshake: "smallest",
|
||||||
},
|
},
|
||||||
treeshake: "smallest",
|
sourcemap: env.VITE_MODE === "production",
|
||||||
|
target: "es2020",
|
||||||
|
write: true,
|
||||||
},
|
},
|
||||||
sourcemap: true,
|
mode: env.VITE_MODE ?? "development",
|
||||||
target: "es2020",
|
plugins: [
|
||||||
write: true,
|
// Permet de valider les variables d'environnements définies à partir d'un schéma Valibot
|
||||||
},
|
valibot(SCHEMA_ENVIRONNEMENT),
|
||||||
plugins: [
|
manifestSRI({ algorithms: ["sha512"] }),
|
||||||
// Permet de valider les variables d'environnements définies à partir d'un schéma Valibot
|
nodePolyfills({
|
||||||
valibot(SCHEMA_ENVIRONNEMENT),
|
include: [],
|
||||||
manifestSRI({ algorithms: ["sha512"] }),
|
protocolImports: true,
|
||||||
nodePolyfills({
|
}),
|
||||||
include: [],
|
],
|
||||||
protocolImports: true,
|
};
|
||||||
}),
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,74 +1,74 @@
|
||||||
{
|
{
|
||||||
"_api.DpNqIphF.js": {
|
"_api.sn6CvYBX.js": {
|
||||||
"file": "api.DpNqIphF.js",
|
"file": "api.sn6CvYBX.js",
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"integrity": "sha512-mTfL4gtvoz3qjZQc7YT1SR3vveP++WDx2k4ZRvGymQqyphpGVy449QeScFaoHKn1foAIA6tVv3zyLPRRxNe8DA=="
|
"integrity": "sha512-IHCUEXhZ0jGYLByQuCrZLLyT33rn+dZ+vE3cqzGnYODtRBf20xpDudhp9dJBYHK2WHuPXUO9TQ9RG23/UFKgEA=="
|
||||||
},
|
},
|
||||||
"_exports.1ijyAKMZ.js": {
|
"_exports.B0KsqwcX.js": {
|
||||||
"file": "exports.1ijyAKMZ.js",
|
"file": "exports.B0KsqwcX.js",
|
||||||
"name": "exports",
|
"name": "exports",
|
||||||
"integrity": "sha512-rJhZSofSl3JPZZ+GhoqNey/Yq1PI4SLzLm9zb6x2wNb+XrqHY//eaKKfWFpTDTAq3kb5GA83kQAQCbTIT87dqw=="
|
"integrity": "sha512-4J3P0kXIHBndu9OwcKNN5eaSkK9pPXeILC4nQ0G6BGXo8TkHVbpNq1vtKhif4bJKmPB7BCfEN1qxrabF9002uw=="
|
||||||
},
|
},
|
||||||
"_gardes.CUgVnuaB.js": {
|
"_gardes.DBQSoZA5.js": {
|
||||||
"file": "gardes.CUgVnuaB.js",
|
"file": "gardes.DBQSoZA5.js",
|
||||||
"name": "gardes",
|
"name": "gardes",
|
||||||
"integrity": "sha512-vm0IriyudxmLFDDV6rB6o7rCqTsT2I7Rupjru5IX6WuTx8WZ+Pvm8Xnml4qUvhIAcDjM1NnOohGItitNxLKYHA=="
|
"integrity": "sha512-h25A7ttXwwAmgkVObii1ElP0ao+/PYIq9q0VE0n5rvVF+MqaI6OKp+eSIWDHsmrNy0gfjOcakIFQjc9wKXaJmg=="
|
||||||
},
|
},
|
||||||
"_index-c1cc4c86.RjqwfILA.js": {
|
"_index-c1cc4c86.C0keEzN6.js": {
|
||||||
"file": "index-c1cc4c86.RjqwfILA.js",
|
"file": "index-c1cc4c86.C0keEzN6.js",
|
||||||
"name": "index-c1cc4c86",
|
"name": "index-c1cc4c86",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js"
|
"_utils.CpY6lC-L.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-H92M5EOab0KcEZ7HG5eU3A04CJhqcemVErVxHIP9cFW4hFUMiL3qB+lv4cQQ7AszeOfbMINXqggZvaG8wfIZfA=="
|
"integrity": "sha512-+eWqf9Np9p4PooSLS38x1vueotM7CUQhE4+TOsEUOTiq71SJMJTKLhnmPu7pfs5vAPsfyFOLTcY6Y53Axdz0mg=="
|
||||||
},
|
},
|
||||||
"_index.CuMLbxmh.js": {
|
"_index.CeK6pfoJ.js": {
|
||||||
"file": "index.CuMLbxmh.js",
|
"file": "index.CeK6pfoJ.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"integrity": "sha512-u/eN65V2Mf+6bp8PJqdo4/z5+Ht+17xIrQG7BPsZWCM8BNgBh9Sllb+qTa1gAqj+f8zUsADoUA93twZvBTU6nQ=="
|
"integrity": "sha512-1w99lJFYDu79R+hHxMxvYeqYSoK7veDPlF8Rzbs6qf56698A9BJslhj7GsDepyEXmawU05g6EBusu5e8sFgSjw=="
|
||||||
},
|
},
|
||||||
"_messages.Qx8X6YMT.js": {
|
"_messages.Cfpdtehd.js": {
|
||||||
"file": "messages.Qx8X6YMT.js",
|
"file": "messages.Cfpdtehd.js",
|
||||||
"name": "messages",
|
"name": "messages",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_validation.p-hUfG_o.js",
|
"_validation.BxHP2h2i.js",
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-PGSWoFfZPADzB4i4pFN468IMt8tYXQrFXOL8sPN5QSBLEu7F4jEFJZ1Ym5iSpomPaXLLIIg2HmXT50yBq8SiHA=="
|
"integrity": "sha512-MAd2Uap9aHnb+4eD+JmEmuzmw9R5xyPrcExBzRRtRAB3C8CbHSj2qa5yyzEi/MRfY/poaALRYw9UR1wu7Eu3vw=="
|
||||||
},
|
},
|
||||||
"_nombres.n4VPN7qr.js": {
|
"_nombres.BEH5KeJK.js": {
|
||||||
"file": "nombres.n4VPN7qr.js",
|
"file": "nombres.BEH5KeJK.js",
|
||||||
"name": "nombres",
|
"name": "nombres",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-tplE1x3QotJwjR/88Gked0Naxkl+PwUtPNjSDoWwIyl/3Y5jyCSbcBSAvcPNG5K0CyJRnozj5aUiVXazKm50XA=="
|
"integrity": "sha512-1YnZOciujiT2HT/ZEw/euv5CloN9v5BmWGlK1YB11pz6eUte9jCuf0LVSNytze7aKVABgieyPytilJKfkrhITA=="
|
||||||
},
|
},
|
||||||
"_reseau.C8CWV2JS.js": {
|
"_reseau.BTSNCA1g.js": {
|
||||||
"file": "reseau.C8CWV2JS.js",
|
"file": "reseau.BTSNCA1g.js",
|
||||||
"name": "reseau",
|
"name": "reseau",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_api.sn6CvYBX.js",
|
||||||
"_api.DpNqIphF.js"
|
"_utils.CpY6lC-L.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-HUpopU/Kk2R5l1fNpuKaUBAXYyG1/ofIRXmEfXHTElg7E8vbyWAde8b1ZLR4t6iKwl3mhraHzRlPbcjkS3RQEw=="
|
"integrity": "sha512-5XlkhlMl2cjhO3WGGBiZjs3fTwPUHssKwGsx4T8P9Fob5Ui0Rm7ibULQRGBBC9XyoBdci6HCqSvYJWVh4CJ3/w=="
|
||||||
},
|
},
|
||||||
"_utils.DS2YS0tX.js": {
|
"_utils.CpY6lC-L.js": {
|
||||||
"file": "utils.DS2YS0tX.js",
|
"file": "utils.CpY6lC-L.js",
|
||||||
"name": "utils",
|
"name": "utils",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-MpJC/uObUIE48VQyU7cfHHe1oTqniZuIThTp/gXSNBQuWjwwIe5FbCJBeR0+6Ab/oL9nHgMP9lkSb//iVjPPew=="
|
"integrity": "sha512-S5zwOSk60GPiiMWS2FvWLFbj2M9UezotF8SDogLT3nyhwcVwlwhX1v2VkteSlxzRysxGfQoTLZ9A60dQYCQ2ww=="
|
||||||
},
|
},
|
||||||
"_validation.p-hUfG_o.js": {
|
"_validation.BxHP2h2i.js": {
|
||||||
"file": "validation.p-hUfG_o.js",
|
"file": "validation.BxHP2h2i.js",
|
||||||
"name": "validation",
|
"name": "validation",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js"
|
"_utils.CpY6lC-L.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-JiBgCO1G2lYlIBrQ7JQaqIynKpti44CoSRZt5JUluqbzEx6d7RGdtrxvTQOZI71tu4mKeFnViC8rZhlFRyabTw=="
|
"integrity": "sha512-wO9O4uiE8p6HzOs3vrR5dq03/lSRYBxnM3b15rDK9IB4ANkkpUD8BBWu+5jLYHndbmCX/bNNYDOHvEKga9HXTg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts": {
|
||||||
"file": "gaffe.js",
|
"file": "gaffe.js",
|
||||||
|
|
@ -76,10 +76,10 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/gaffe.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_api.DpNqIphF.js",
|
"_api.sn6CvYBX.js",
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-4MYUCOMO0X3HFwN7ubugRTcF0GkMRxsLS0ziTYQewm523z3vWPPAXs9hhGJHjt2jhZY8m1wyadKCJCvBHnVqCA=="
|
"integrity": "sha512-slFdBLR4oN3CEi9YpXwX0sYUyTTWc6xTSgNtNRHBUyrQCFc3Hv0khwd52Ao/80gELsToD3/otO+SH3Vhq3Ttrg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts": {
|
||||||
"file": "scripts-bouton-panier.js",
|
"file": "scripts-bouton-panier.js",
|
||||||
|
|
@ -87,12 +87,12 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-panier.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_messages.Qx8X6YMT.js",
|
"_messages.Cfpdtehd.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_validation.p-hUfG_o.js"
|
"_validation.BxHP2h2i.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-O2UStDYJI8sYbmVPxIyKcv0LGLbW6e/NnBl5mWF07XE6LrsJCl+6aopsTQso+Rum66nDaBtBmDGXP+ugZx2vRg=="
|
"integrity": "sha512-oYY9nW57p388NsZjHHwp+hAdsp1bB0EUVNnSLhfhSl+wROZ1XwjXeVZKUV0Val2dUhA6Eu5iHdufzIcWoHMZTw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-retour-sommet.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-retour-sommet.ts": {
|
||||||
"file": "scripts-bouton-retour-sommet.js",
|
"file": "scripts-bouton-retour-sommet.js",
|
||||||
|
|
@ -100,11 +100,11 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-retour-sommet.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-bouton-retour-sommet.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js"
|
"_index-c1cc4c86.C0keEzN6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-eSgUhUMFGH3+lb8VHA7SMxEKH1hennA3ioZtwQRgam4A0PkArixOH6dWVnssBK5m0JS6SI5MSdYw7bbsKO3Iig=="
|
"integrity": "sha512-uodiNu9VatWMjE3otfIawNnfI5dfPse56Yy+18M7dvkuW9eKVsLzPhgL9TuoO3uATKTIAuc9dhRP4nEKx6Fglg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts": {
|
||||||
"file": "scripts-menu-categories.js",
|
"file": "scripts-menu-categories.js",
|
||||||
|
|
@ -112,11 +112,11 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-categories.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.CuMLbxmh.js",
|
"_index.CeK6pfoJ.js",
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-bBtWkcglfOQX2zrtNSjjqbtgvIs/NU5LQCvUUHNSN+vSBZMUfooTPsbhns68cydEkXdIiz1gN4bOJm4NCb2BIQ=="
|
"integrity": "sha512-da/GHRU53343rznuQbNy0XHyfMeqGu779Ut2c8PGEfhaAYVOn64HBwJ08CZltOfl9VJHvcFl1Bc1GYVzWfV3OQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts": {
|
||||||
"file": "scripts-menu-mobile.js",
|
"file": "scripts-menu-mobile.js",
|
||||||
|
|
@ -124,11 +124,11 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-menu-mobile.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js"
|
"_index-c1cc4c86.C0keEzN6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-I+HieuVa3p0OLDdzNJhRu12fNnKtH0JVInJT+zheNGEFRl03ckB0O261xXeF4hzoGFMRq0r3kMwQ0BiJcaMBvg=="
|
"integrity": "sha512-OpH8rcFhryaJkylejvd+lBz/8471rvL531zUUSh1EW0j6vuZ7xlZkZnw/InUskptCAea/2RBfiN5F/SbMNycNQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts": {
|
||||||
"file": "scripts-page-a-propos.js",
|
"file": "scripts-page-a-propos.js",
|
||||||
|
|
@ -136,11 +136,11 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js"
|
"_index-c1cc4c86.C0keEzN6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-wkbRCz77c1NXq/bAIzaGkNsSfKqN+gQxpA8t/VEQCfmQNHJsScjdodSuOefw9WhQQwQpE5CY6QauG7MDOLtRug=="
|
"integrity": "sha512-nlGl2dpx7IQoeyluJxLOqt2TEojjRoE5N1zzDCmlgCObDuJHONjMnW1AgTMFIQPFrLDdr+4ko829NGO6aZySiA=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts": {
|
||||||
"file": "scripts-page-accueil.js",
|
"file": "scripts-page-accueil.js",
|
||||||
|
|
@ -148,12 +148,12 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_nombres.n4VPN7qr.js",
|
"_nombres.BEH5KeJK.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js"
|
"_index-c1cc4c86.C0keEzN6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-GF+2quJeXyU5difx44vjv4/eLm7EGD6RS1jTzj68+HzLf0i3kHcFMxCwYLM5I7Eu0FvDq/DNRTHdH86aRKJQww=="
|
"integrity": "sha512-pnghMb+57OAqAQZOzwx5ByQNSuzIB9AO75cgYEB2mwrcJ7BE2HxkFPAiFeDf7Et/l+bRnLUiFlF5DXQG4Plffw=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts": {
|
||||||
"file": "scripts-page-boutique.js",
|
"file": "scripts-page-boutique.js",
|
||||||
|
|
@ -161,14 +161,14 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.CuMLbxmh.js",
|
"_index.CeK6pfoJ.js",
|
||||||
"_validation.p-hUfG_o.js",
|
"_validation.BxHP2h2i.js",
|
||||||
"_api.DpNqIphF.js",
|
"_api.sn6CvYBX.js",
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_reseau.C8CWV2JS.js",
|
"_reseau.BTSNCA1g.js",
|
||||||
"_exports.1ijyAKMZ.js"
|
"_exports.B0KsqwcX.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-hkKU+xO2o23KphBXVN7Im7knCzLn4VpgazebmRRJSclm4x1ZX4Q4NwK2K5JpHjzIEyMbAg4UiR8tLkH8EU3kew=="
|
"integrity": "sha512-eLiXDKtS0NQp3xgqb+TzTLgkFg5SDLeZKlNC0g7xcJm10yFWv1mQaTUcG7oA80hEkFR3wWGk8Ywlf3snGcQfDg=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
||||||
"file": "scripts-page-panier.js",
|
"file": "scripts-page-panier.js",
|
||||||
|
|
@ -176,18 +176,18 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_messages.Qx8X6YMT.js",
|
"_messages.Cfpdtehd.js",
|
||||||
"_nombres.n4VPN7qr.js",
|
"_nombres.BEH5KeJK.js",
|
||||||
"_index.CuMLbxmh.js",
|
"_index.CeK6pfoJ.js",
|
||||||
"_validation.p-hUfG_o.js",
|
"_validation.BxHP2h2i.js",
|
||||||
"_api.DpNqIphF.js",
|
"_api.sn6CvYBX.js",
|
||||||
"_reseau.C8CWV2JS.js",
|
"_reseau.BTSNCA1g.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js",
|
"_index-c1cc4c86.C0keEzN6.js",
|
||||||
"_gardes.CUgVnuaB.js"
|
"_gardes.DBQSoZA5.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-xWRO6G9WQM4CwzVGBh9FYmHX+fslOq25ELZZZtSgm3Q6wEfCk4uages0uJ2enzKi47OadCASXPx9jNOdWn/fMA=="
|
"integrity": "sha512-f+g2Aj4Ngwii3Y2CgGpZt1bG8DL9UmgB2UhRiket/6PlnMmk4OZ57ji0tZdq022TjAud7Ll4OOSWzTMf+WPZnQ=="
|
||||||
},
|
},
|
||||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
||||||
"file": "scripts-page-produit.js",
|
"file": "scripts-page-produit.js",
|
||||||
|
|
@ -195,16 +195,16 @@
|
||||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts",
|
"src": "web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_index.CuMLbxmh.js",
|
"_index.CeK6pfoJ.js",
|
||||||
"_validation.p-hUfG_o.js",
|
"_validation.BxHP2h2i.js",
|
||||||
"_api.DpNqIphF.js",
|
"_api.sn6CvYBX.js",
|
||||||
"_utils.DS2YS0tX.js",
|
"_utils.CpY6lC-L.js",
|
||||||
"_reseau.C8CWV2JS.js",
|
"_gardes.DBQSoZA5.js",
|
||||||
"_gardes.CUgVnuaB.js",
|
"_messages.Cfpdtehd.js",
|
||||||
"_messages.Qx8X6YMT.js",
|
"_reseau.BTSNCA1g.js",
|
||||||
"_exports.1ijyAKMZ.js",
|
"_exports.B0KsqwcX.js",
|
||||||
"_index-c1cc4c86.RjqwfILA.js"
|
"_index-c1cc4c86.C0keEzN6.js"
|
||||||
],
|
],
|
||||||
"integrity": "sha512-aqdkuZjhvcdnGLbqGdmYphpDjDprtPrwsr6kTBUQ0LZ78gLuQmhQTVUA4k7/f8FyEhNYt6l4QjtUXEKrIAfLAg=="
|
"integrity": "sha512-TxxHyGL6JJUksf+8ohB0NoUpIwxvn/iroG7A0QiEzmJk17snbdNZH5WHfyNHmTo26T19KjkTsNwXqzURce9n8Q=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
const E="wp-json",t=`/${E}/wc/store/cart/add-item`,_=`/${E}/wc/store/cart/apply-coupon`,s=`/${E}/wc/store/cart/update-item`,c=`/${E}/wc/store/cart/update-customer`,T=`/${E}/wc/v3/orders`,o=`/${E}/wc/v3/products`,I=`/${E}/wc/store/cart/remove-item`,R=`/${E}/wc/store/cart/remove-coupon`,a="Nonce",e="retry-after",r="x-sentry-rate-limits";export{r as E,o as R,e as a,c as b,T as c,_ as d,R as e,s as f,I as g,t as h,a as i};
|
|
||||||
//# sourceMappingURL=api.DpNqIphF.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"api.DpNqIphF.js","sources":["../../src/scripts/constantes/api.ts"],"sourcesContent":["/** Chemins et Routes pour l'API WordPress/ */\n\nexport const CHEMIN_API_REST = \"wp-json\";\nexport const ROUTE_API_AJOUTE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/add-item`;\nexport const ROUTE_API_APPLIQUE_COUPON = `/${CHEMIN_API_REST}/wc/store/cart/apply-coupon`;\nexport const ROUTE_API_COUPONS = `/${CHEMIN_API_REST}/wc/store/cart/coupons`;\nexport const ROUTE_API_MAJ_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/update-item`;\nexport const ROUTE_API_MAJ_CLIENT = `/${CHEMIN_API_REST}/wc/store/cart/update-customer`;\nexport const ROUTE_API_NOUVELLE_COMMANDES = `/${CHEMIN_API_REST}/wc/v3/orders`;\nexport const ROUTE_API_NOUVELLE_PRODUCTS = `/${CHEMIN_API_REST}/wc/v3/products`;\nexport const ROUTE_API_PANIER = `/${CHEMIN_API_REST}/wc/store/cart`;\nexport const ROUTE_API_PRODUITS = `/${CHEMIN_API_REST}/wc/store/products`;\nexport const ROUTE_API_RETIRE_ARTICLE_PANIER = `/${CHEMIN_API_REST}/wc/store/cart/remove-item`;\nexport const ROUTE_API_RETIRE_COUPON = `/${CHEMIN_API_REST}/wc/store/cart/remove-coupon`;\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":["CHEMIN_API_REST","ROUTE_API_AJOUTE_ARTICLE_PANIER","ROUTE_API_APPLIQUE_COUPON","ROUTE_API_MAJ_ARTICLE_PANIER","ROUTE_API_MAJ_CLIENT","ROUTE_API_NOUVELLE_COMMANDES","ROUTE_API_NOUVELLE_PRODUCTS","ROUTE_API_RETIRE_ARTICLE_PANIER","ROUTE_API_RETIRE_COUPON","ENTETE_WC_NONCE","ENTETE_GLITCHTIP_RETRY_AFTER","ENTETE_GLITCHTIP_RATE_LIMITS"],"mappings":"AAEO,MAAMA,EAAkB,UAClBC,EAAkC,IAAID,CAAe,0BACrDE,EAA4B,IAAIF,CAAe,8BAE/CG,EAA+B,IAAIH,CAAe,6BAClDI,EAAuB,IAAIJ,CAAe,iCAC1CK,EAA+B,IAAIL,CAAe,gBAClDM,EAA8B,IAAIN,CAAe,kBAGjDO,EAAkC,IAAIP,CAAe,6BACrDQ,EAA0B,IAAIR,CAAe,+BAG7CS,EAAkB,QAClBC,EAA+B,cAC/BC,EAA+B"}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
const s=e=>t=>t instanceof e,n=s(HTMLSelectElement),c=e=>e.status===500;export{n as a,c as e};
|
|
||||||
//# sourceMappingURL=gardes.CUgVnuaB.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"gardes.CUgVnuaB.js","sources":["../../src/scripts/lib/gardes.ts"],"sourcesContent":["import type { Constructor } from \"./types/classes\";\n\nconst estElement = <T extends HTMLElement>(typeElement: Constructor<T>) => (element: unknown): element is T =>\n element instanceof typeElement;\n\nexport const estHTMLSelectElement = estElement<HTMLSelectElement>(HTMLSelectElement);\n\nexport const estError = (erreur: unknown): erreur is Error => erreur instanceof Error;\n\nexport const estReponse500 = (reponse: Response): boolean => reponse.status === 500;\n"],"names":["estElement","typeElement","element","estHTMLSelectElement","estReponse500","reponse"],"mappings":"AAEA,MAAMA,EAAqCC,GAAiCC,GAC1EA,aAAmBD,EAERE,EAAuBH,EAA8B,iBAAiB,EAItEI,EAAiBC,GAA+BA,EAAQ,SAAW"}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
import{aG as o,aH as a,aI as $,aJ as A,aK as G,aL as M}from"./utils.DS2YS0tX.js";function v(n,t,r){for(var e=new Array(r),u=0,i=t;u<r;)e[u]=n[i],u=u+1|0,i=i+1|0;return e}function R(n,t){for(;;){var r=t,e=n,u=e.length,i=u===0?1:u,f=i-r.length|0;if(f===0)return e.apply(null,r);if(f>=0)return function(c,m){return function(S){return R(c,m.concat([S]))}}(e,r);t=v(r,i,0|-f),n=e.apply(null,v(r,0,i))}}function U(n,t){var r=n.length;if(r===1)return n(t);switch(r){case 1:return n(t);case 2:return function(e){return n(t,e)};case 3:return function(e,u){return n(t,e,u)};case 4:return function(e,u,i){return n(t,e,u,i)};case 5:return function(e,u,i,f){return n(t,e,u,i,f)};case 6:return function(e,u,i,f,c){return n(t,e,u,i,f,c)};case 7:return function(e,u,i,f,c,m){return n(t,e,u,i,f,c,m)};default:return R(n,[t])}}function X(n){return n.length===1?n:function(t){return U(n,t)}}var g={contents:0};function k(n){return g.contents=g.contents+1|0,n+"/"+g.contents}function F(n){return n==null?!1:typeof n.RE_EXN_ID=="string"}function J(n){if(n!==void 0)return o(n);throw{RE_EXN_ID:"Not_found",Error:new Error}}function I(n,t,r){return n!==void 0?r(o(n)):t}function T(n,t){if(n!==void 0)return a(t(o(n)))}function s(n,t){if(n!==void 0)return t(o(n))}function q(n,t){return s(n,X(t))}function l(n,t){return n!==void 0?o(n):t}function H(n){return n!==void 0}function K(n){return n===void 0}var L=k("Promise.JsError");function O(n,t){return n.catch(function(r){return U(t,F(r)?r:{RE_EXN_ID:L,_1:r})})}function j(n){}function B(n){return a(n)}function C(n){}function Q(n){if(n!=null)return a(n)}function V(n){if(n)return n}function h(n,t){return q(n==null?void 0:a(n),function(r){if(t(r))return a(r)})}function Y(){if(arguments.length===1){const n=arguments;return function(r){return h(r,n[0])}}return h(arguments[0],arguments[1])}function Z(n){try{return a(n(void 0))}catch{return}}function nn(n){return O(n.then(function(t){return a(t)}),function(t){return Promise.resolve(void 0)})}var d=T;function tn(){if(arguments.length===1){const n=arguments;return function(r){return d(r,n[0])}}return d(arguments[0],arguments[1])}var _=s;function rn(){if(arguments.length===1){const n=arguments;return function(r){return _(r,n[0])}}return _(arguments[0],arguments[1])}var p=I;function en(){if(arguments.length===2){const n=arguments;return function(r){return p(r,n[0],n[1])}}return p(arguments[0],arguments[1],arguments[2])}function N(n,t){if(n!==void 0)return A(t(o(n)))}function un(){if(arguments.length===1){const n=arguments;return function(r){return N(r,n[0])}}return N(arguments[0],arguments[1])}function E(n,t){return s(n,function(r){if(t(r))return a(r)})}function on(){if(arguments.length===1){const n=arguments;return function(r){return E(r,n[0])}}return E(arguments[0],arguments[1])}var b=l;function fn(){if(arguments.length===1){const n=arguments;return function(r){return b(r,n[0])}}return b(arguments[0],arguments[1])}var an=J;function cn(n){return l(n,null)}function sn(n){return l(n,void 0)}function D(n,t){return n!==void 0?{TAG:0,_0:o(n)}:{TAG:1,_0:t}}function mn(){if(arguments.length===1){const n=arguments;return function(r){return D(r,n[0])}}return D(arguments[0],arguments[1])}function w(n,t,r){return n!==void 0?t(o(n)):r(void 0)}function gn(){if(arguments.length===2){const n=arguments;return function(r){return w(r,n[0],n[1])}}return w(arguments[0],arguments[1],arguments[2])}var ln=K,vn=H;function y(n,t){return n!==void 0&&t(o(n)),n}function hn(){if(arguments.length===1){const n=arguments;return function(r){return y(r,n[0])}}return y(arguments[0],arguments[1])}function P(n,t){return I(n,!1,function(r){return G(r,t)})}function dn(){if(arguments.length===1){const n=arguments;return function(r){return P(r,n[0])}}return P(arguments[0],arguments[1])}function W(n,t){if(n!==void 0&&t!==void 0)return[o(n),o(t)]}function _n(){if(arguments.length===1){const n=arguments;return function(r){return W(r,n[0])}}return W(arguments[0],arguments[1])}function x(n,t,r){if(n!==void 0&&t!==void 0)return a(r(o(n),o(t)))}function pn(){if(arguments.length===2){const n=arguments;return function(r){return x(r,n[0],n[1])}}return x(arguments[0],arguments[1],arguments[2])}function z(n,t,r){return n!==void 0?t(o(n)):r(void 0)}function Nn(){if(arguments.length===2){const n=arguments;return function(r){return z(r,n[0],n[1])}}return z(arguments[0],arguments[1],arguments[2])}function En(n){return $(n,[],function(t,r){return s(t,function(e){if(r!==void 0)return M(e,[o(r)])})})}const bn=n=>n;var wn={__proto__:null,Some:bn,None:void 0,placeholder:j,makeSome:B,makeNone:C,fromNullable:Q,fromFalsy:V,fromPredicate:Y,fromExecution:Z,fromPromise:nn,map:tn,flatMap:rn,mapWithDefault:en,mapNullable:un,filter:on,getWithDefault:fn,getExn:an,toNullable:cn,toUndefined:sn,toResult:mn,match:gn,isNone:ln,isSome:vn,tap:hn,contains:dn,zip:_n,zipWith:pn,fold:Nn,all:En};export{wn as P,rn as f,fn as g,hn as t};
|
|
||||||
//# sourceMappingURL=index-c1cc4c86.RjqwfILA.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{o as a,l as y,a as p,s as e,u as d,p as i,k as x,g as u,q as h,n as t,i as m,r as I,c as r,f as o,d as c,e as S,h as j,t as v,v as g,w as C,j as A}from"./validation.p-hUfG_o.js";import{aF as f,I as M}from"./utils.DS2YS0tX.js";import{a0 as E}from"./exports.1ijyAKMZ.js";const W="bouton_panier",B="contenu_panier",X="revalidation_livraison",l={MajBoutonPanier:"maj_bouton_panier",MajContenuPanier:"maj_contenu_panier",RevalidationLivraison:"revalidation_livraison"},N=a({code:e(),data:a({status:t()}),message:e()}),R=a({body:N,status:t()}),T=a({code:y("rest_invalid_param"),data:a({details:a({billing_address:p(a({code:e(),data:d([u(),e()]),message:e()})),shipping_address:p(a({code:e(),data:d([u(),e()]),message:e()}))}),params:a({billing_address:p(e()),shipping_address:p(e())}),status:y(400)}),message:i(e(),h("Invalid parameter(s):"),h("_address"))}),Z=s=>x(T,s),L={INVISIBLE:"invisible",VISIBLE:"visible"},k=a({address_1:e(),address_2:e(),city:e(),company:e(),country:e(),email:e(),first_name:e(),last_name:e(),phone:e(),postcode:e(),state:e()}),P=a({address_1:e(),address_2:e(),city:e(),company:e(),country:e(),first_name:e(),last_name:e(),phone:e(),postcode:e(),state:e()}),q=a({code:e(),discount_type:e(),totals:a({currency_code:e(),currency_decimal_separator:e(),currency_minor_unit:i(t(),m()),currency_prefix:e(),currency_suffix:e(),currency_symbol:e(),currency_thousand_separator:e(),total_discount:e(),total_discount_tax:e()})}),w=a({key:e(),name:e(),quantity:t()}),O=a({currency_code:e(),currency_decimal_separator:e(),currency_minor_unit:t(),currency_prefix:e(),currency_suffix:e(),currency_symbol:e(),currency_thousand_separator:e(),delivery_time:e(),description:e(),instance_id:t(),meta_data:r(o()),method_id:e(),name:e(),price:e(),rate_id:e(),selected:c(),taxes:e()}),V=r(O),D=a({destination:I(P,["company","first_name","last_name","phone"]),items:r(w),name:e(),package_id:t(),shipping_rates:V}),U=a({currency_code:e(),currency_decimal_separator:e(),currency_minor_unit:t(),currency_prefix:e(),currency_suffix:e(),currency_symbol:e(),currency_thousand_separator:e(),line_subtotal:e(),line_subtotal_tax:e(),line_total:e(),line_total_tax:e()}),b=a({backorders_allowed:c(),catalog_visibility:S(L),description:e(),extensions:o(),id:t(),images:r(o()),item_data:r(o()),key:e(),low_stock_remaining:d([u()]),name:e(),permalink:i(e(),j()),prices:o(),quantity:t(),quantity_limits:o(),short_description:e(),show_backorder_badge:c(),sku:e(),sold_individually:c(),totals:U,type:e(),variation:r(o())}),G=a({currency_code:e(),currency_decimal_separator:e(),currency_minor_unit:t(),currency_prefix:e(),currency_suffix:e(),currency_symbol:e(),currency_thousand_separator:e(),tax_lines:r(o()),total_discount:e(),total_discount_tax:e(),total_fees:e(),total_fees_tax:e(),total_items:e(),total_items_tax:e(),total_price:e(),total_shipping:i(d([e(),u()]),v(Number)),total_shipping_tax:d([e(),u()]),total_tax:e()}),ee=a({billing_address:k,coupons:r(q),cross_sells:o(),errors:o(),extensions:o(),fees:o(),has_calculated_shipping:c(),items:r(b),items_count:i(t(),m()),items_weight:i(t(),m()),needs_payment:c(),needs_shipping:c(),payment_methods:o(),payment_requirements:o(),shipping_address:P,shipping_rates:r(D),totals:G});S(l);const F=a({quantiteProduits:t()}),Y=a({donnees:F,type:i(e(),g(l.MajBoutonPanier))}),$=a({produits:r(b),sousTotalProduits:t(),sousTotalReduction:t(),totalPanier:t()}),z=a({donnees:$,type:i(e(),g(l.MajContenuPanier))}),H=(s,n)=>(s.postMessage(n),s),ae=s=>{const n=new BroadcastChannel(W);n.postMessage({donnees:{quantiteProduits:s.quantiteProduits},type:l.MajBoutonPanier}),n.close()},se=s=>{const n=new BroadcastChannel(B);n.postMessage({donnees:{produits:s.produits,sousTotalProduits:s.sousTotalProduits,sousTotalReduction:s.sousTotalReduction,totalPanier:s.totalPanier},type:l.MajContenuPanier}),n.close()},te=(s,n)=>E(new BroadcastChannel(s),_=>H(_,n),_=>_.close()),ne=s=>f.of(C(Y,s.data)).ifLeft(n=>M(n)),oe=s=>f.of(C(z,s.data)).ifLeft(n=>M(n)),re=(s,n)=>A(s,R).map(_=>_.body.code===n).orDefault(!1);export{W as N,k as W,P as a,X as b,te as c,ee as d,Z as e,V as f,ae as g,se as h,B as i,oe as j,re as r,ne as v};
|
|
||||||
//# sourceMappingURL=messages.Qx8X6YMT.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{a0 as h}from"./exports.1ijyAKMZ.js";function _(n,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return n%t}function p(n){}function v(n){return n-1|0}function b(n){return n+1|0}function u(n,t){return n+t}function E(){if(arguments.length===1){const n=arguments;return function(r){return u(r,n[0])}}return u(arguments[0],arguments[1])}function e(n,t){return n-t}function N(){if(arguments.length===1){const n=arguments;return function(r){return e(r,n[0])}}return e(arguments[0],arguments[1])}function s(n,t){return n*t}function x(){if(arguments.length===1){const n=arguments;return function(r){return s(r,n[0])}}return s(arguments[0],arguments[1])}function o(n,t){return n/t}function D(){if(arguments.length===1){const n=arguments;return function(r){return o(r,n[0])}}return o(arguments[0],arguments[1])}var i=_;function M(){if(arguments.length===1){const n=arguments;return function(r){return i(r,n[0])}}return i(arguments[0],arguments[1])}function a(n,t){return[n/t,_(0|n,0|t)]}function y(){if(arguments.length===1){const n=arguments;return function(r){return a(r,n[0])}}return a(arguments[0],arguments[1])}function f(n,t){return n>t}function w(){if(arguments.length===1){const n=arguments;return function(r){return f(r,n[0])}}return f(arguments[0],arguments[1])}function g(n,t){return n>=t}function W(){if(arguments.length===1){const n=arguments;return function(r){return g(r,n[0])}}return g(arguments[0],arguments[1])}function m(n,t){return n<t}function z(){if(arguments.length===1){const n=arguments;return function(r){return m(r,n[0])}}return m(arguments[0],arguments[1])}function c(n,t){return n<=t}function A(){if(arguments.length===1){const n=arguments;return function(r){return c(r,n[0])}}return c(arguments[0],arguments[1])}function l(n,t,r){return Math.min(Math.max(n,t),r)}function C(){if(arguments.length===2){const n=arguments;return function(r){return l(r,n[0],n[1])}}return l(arguments[0],arguments[1],arguments[2])}var d={__proto__:null,placeholder:p,pred:v,succ:b,add:E,subtract:N,multiply:x,divide:D,modulo:M,divideWithModulo:y,gt:w,gte:W,lt:z,lte:A,clamp:C};const I=(n,t,r)=>d.gte(n,t)&&d.lt(n,r),P=n=>Number(n)/100,R=n=>h(Number(n),t=>t.toFixed(2)),S=n=>Number(n)*-1,X=n=>`${String(n)}€`;export{R as a,P as d,I as e,X as f,S as i};
|
|
||||||
//# sourceMappingURL=nombres.n4VPN7qr.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{r as o,S as a,a as r,A as s}from"./utils.DS2YS0tX.js";import{N as d,v as E}from"./messages.Qx8X6YMT.js";import{a0 as N}from"./exports.1ijyAKMZ.js";import"./validation.p-hUfG_o.js";const u=()=>{const e=N(o(a),r),t=new BroadcastChannel(d);t.onmessage=i=>{E(i).ifRight(n=>{e.textContent=`cart (${String(n.donnees.quantiteProduits)})`,e.setAttribute(s,String(n.donnees.quantiteProduits>0))})},document.addEventListener("visibilitychange",()=>{t.close()})};document.addEventListener("DOMContentLoaded",()=>{u()});
|
|
||||||
//# sourceMappingURL=scripts-bouton-panier.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"scripts-bouton-panier.js","sources":["../../src/scripts/scripts-bouton-panier.ts"],"sourcesContent":["/**\n * Scripts pour la mise à jour trans-fenêtres/trans-onglets du Bouton du Panier.\n */\n\nimport { pipe } from \"@mobily/ts-belt\";\n\nimport type { MessageMajBoutonPanier } from \"./lib/types/messages\";\n\nimport { ATTRIBUT_CONTIENT_ARTICLES, SELECTEUR_BOUTON_PANIER } from \"./constantes/dom.ts\";\nimport { NOM_CANAL_BOUTON_PANIER } from \"./constantes/messages.ts\";\nimport { recupereElementOuLeve } from \"./lib/dom.ts\";\nimport { valideMessageMajBoutonPanier } from \"./lib/messages.ts\";\nimport { recupereElementDocumentEither } from \"./lib/utils.ts\";\n\nconst initialiseBoutonPanier = (): void => {\n /** Le « Bouton » vers le Panier dont le texte est un indicateur du nombre de Produits dedans. */\n const BOUTON_PANIER: HTMLAnchorElement = pipe(\n recupereElementDocumentEither<HTMLAnchorElement>(SELECTEUR_BOUTON_PANIER),\n recupereElementOuLeve,\n );\n const CANAL_BOUTON_PANIER: BroadcastChannel = new BroadcastChannel(NOM_CANAL_BOUTON_PANIER);\n\n CANAL_BOUTON_PANIER.onmessage = (evenementMessage: MessageEvent<unknown>): void => {\n valideMessageMajBoutonPanier(evenementMessage)\n // Met à jour le Bouton du Panier\n .ifRight((message: MessageMajBoutonPanier) => {\n BOUTON_PANIER.textContent = `cart (${String(message.donnees.quantiteProduits)})`;\n BOUTON_PANIER.setAttribute(ATTRIBUT_CONTIENT_ARTICLES, String(message.donnees.quantiteProduits > 0));\n });\n };\n\n // Ferme le BroadcastChannel à la fermeture de la page\n document.addEventListener(\"visibilitychange\", (): void => {\n CANAL_BOUTON_PANIER.close();\n });\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n initialiseBoutonPanier();\n});\n"],"names":["initialiseBoutonPanier","BOUTON_PANIER","pipe","recupereElementDocumentEither","SELECTEUR_BOUTON_PANIER","recupereElementOuLeve","CANAL_BOUTON_PANIER","NOM_CANAL_BOUTON_PANIER","evenementMessage","valideMessageMajBoutonPanier","message","ATTRIBUT_CONTIENT_ARTICLES"],"mappings":"2LAcA,MAAMA,EAAyB,IAAY,CAEzC,MAAMC,EAAmCC,EACvCC,EAAiDC,CAAuB,EACxEC,CACF,EACMC,EAAwC,IAAI,iBAAiBC,CAAuB,EAEtED,EAAA,UAAaE,GAAkD,CACjFC,EAA6BD,CAAgB,EAE1C,QAASE,GAAoC,CAC5CT,EAAc,YAAc,SAAS,OAAOS,EAAQ,QAAQ,gBAAgB,CAAC,IAC7ET,EAAc,aAAaU,EAA4B,OAAOD,EAAQ,QAAQ,iBAAmB,CAAC,CAAC,CAAA,CACpG,CACL,EAGS,SAAA,iBAAiB,mBAAoB,IAAY,CACxDJ,EAAoB,MAAM,CAAA,CAC3B,CACH,EAEA,SAAS,iBAAiB,mBAAoB,IAAM,CAC3BN,EAAA,CACzB,CAAC"}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
import{b as i,c as M,h as l,d as O,e as T,f as s}from"./utils.DS2YS0tX.js";import{a0 as u}from"./exports.1ijyAKMZ.js";import{t as R}from"./index-c1cc4c86.RjqwfILA.js";const e={BOUTON_MENU_MOBILE:i(M),BOUTON_RETOUR_SOMMET:i("#bouton-retour-haut"),CORPS_HTML:i("body"),IMAGE_BOUTON:i("#bouton-retour-haut img")},o=2;let E=e.CORPS_HTML.getBoundingClientRect().height/window.innerHeight,n=window.scrollY,r=!1;const _=()=>window.scrollY,a=t=>{t?(e.BOUTON_RETOUR_SOMMET.setAttribute(O,""),e.BOUTON_RETOUR_SOMMET.setAttribute(T,"99"),e.IMAGE_BOUTON.removeAttribute(s)):(e.BOUTON_RETOUR_SOMMET.removeAttribute(O),e.BOUTON_RETOUR_SOMMET.setAttribute(T,"-2"),e.IMAGE_BOUTON.setAttribute(s,"")),r=!1},U=()=>{window.addEventListener("scroll",()=>{n=_(),!(E<o)&&(r||(r=!0,requestAnimationFrame(()=>a(n>window.innerHeight*o))))}),new ResizeObserver(t=>{u(l(t),R(B=>{E=e.CORPS_HTML.getBoundingClientRect().height/window.innerHeight,n=_()}))}).observe(e.CORPS_HTML),a(n>window.innerHeight*o)},d=()=>{e.BOUTON_RETOUR_SOMMET.addEventListener("click",t=>{t.preventDefault(),window.scrollTo({behavior:"smooth",top:0}),e.BOUTON_MENU_MOBILE.focus({preventScroll:!0})})};document.addEventListener("DOMContentLoaded",()=>{d(),U()});
|
|
||||||
//# sourceMappingURL=scripts-bouton-retour-sommet.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{z as i}from"./index.CuMLbxmh.js";import{b as a,g as o,R as E,i as u,j as R}from"./utils.DS2YS0tX.js";import"./exports.1ijyAKMZ.js";document.addEventListener("DOMContentLoaded",()=>{const e=a(u),t=o(R);E.forEachWithIndex([t.at(0),t.at(-1)],(n,r)=>{r&&new IntersectionObserver(E.forEach(s=>{s.boundingClientRect.top<=0||i([s.isIntersecting,n]).with([!0,0],()=>e.removeAttribute("data-entrees-presentes-debut")).with([!0,1],()=>e.removeAttribute("data-entrees-presentes-fin")).with([!1,0],()=>e.setAttribute("data-entrees-presentes-debut","")).with([!1,1],()=>e.setAttribute("data-entrees-presentes-fin","")).run()}),{root:null,threshold:.9}).observe(r)})});
|
|
||||||
//# sourceMappingURL=scripts-menu-categories.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"scripts-menu-categories.js","sources":["../../src/scripts/scripts-menu-categories.ts"],"sourcesContent":["/** Scripts pour le Menu des Catégories de Produits */\n\nimport { A } from \"@mobily/ts-belt\";\nimport { match } from \"ts-pattern\";\n\nimport { SELECTEUR_ENTREE_MENU_CATEGORIES_PRODUITS, SELECTEUR_MENU_CATEGORIES_PRODUITS } from \"./constantes/dom.ts\";\nimport { recupereEleOuLeve, recupereElesOuLeve } from \"./lib/utils.ts\";\n\ndocument.addEventListener(\"DOMContentLoaded\", (): void => {\n const MENU_CATEGORIES_PRODUITS: HTMLElement = recupereEleOuLeve(SELECTEUR_MENU_CATEGORIES_PRODUITS);\n const ENTREES_MENU_CATEGORIES_PRODUITS: Array<HTMLAnchorElement> = recupereElesOuLeve(\n SELECTEUR_ENTREE_MENU_CATEGORIES_PRODUITS,\n );\n\n A.forEachWithIndex(\n [ENTREES_MENU_CATEGORIES_PRODUITS.at(0), ENTREES_MENU_CATEGORIES_PRODUITS.at(-1)],\n (index, entreeMenu) => {\n if (!entreeMenu) return;\n\n new IntersectionObserver(\n A.forEach(entree => {\n // Ne déclenche rien si le scroll n'est pas horizontal\n if (entree.boundingClientRect.top <= 0) return;\n match([entree.isIntersecting, index])\n .with([true, 0], () => MENU_CATEGORIES_PRODUITS.removeAttribute(\"data-entrees-presentes-debut\"))\n .with([true, 1], () => MENU_CATEGORIES_PRODUITS.removeAttribute(\"data-entrees-presentes-fin\"))\n .with([false, 0], () => MENU_CATEGORIES_PRODUITS.setAttribute(\"data-entrees-presentes-debut\", \"\"))\n .with([false, 1], () => MENU_CATEGORIES_PRODUITS.setAttribute(\"data-entrees-presentes-fin\", \"\"))\n .run();\n }),\n { root: null, threshold: 0.9 },\n ).observe(entreeMenu);\n },\n );\n});\n"],"names":["z","recupereEleOuLeve","recupereElesOuLeve","Ra","SELECTEUR_MENU_CATEGORIES_PRODUITS","SELECTEUR_ENTREE_MENU_CATEGORIES_PRODUITS","MENU_CATEGORIES_PRODUITS","ENTREES_MENU_CATEGORIES_PRODUITS","A","index","entreeMenu","entree","match"],"mappings":"AAQA,OAAA,KAAAA,MAAA,sBAAA,OAAA,KAAAC,EAAA,KAAAC,EAAA,KAAAC,EAAA,KAAAC,EAAA,KAAAC,MAAA,sBAAA,MAAA,wBAAA,SAAS,iBAAiB,mBAAoB,IAAY,CAClD,MAAAC,EAAwCL,EAAkBG,CAAkC,EAC5FG,EAA6DL,EACjEG,CACF,EAEEG,EAAA,iBACA,CAACD,EAAiC,GAAG,CAAC,EAAGA,EAAiC,GAAG,EAAE,CAAC,EAChF,CAACE,EAAOC,IAAe,CAChBA,GAED,IAAA,qBACFF,EAAE,QAAkBG,GAAA,CAEdA,EAAO,mBAAmB,KAAO,GAC/BC,EAAA,CAACD,EAAO,eAAgBF,CAAK,CAAC,EACjC,KAAK,CAAC,GAAM,CAAC,EAAG,IAAMH,EAAyB,gBAAgB,8BAA8B,CAAC,EAC9F,KAAK,CAAC,GAAM,CAAC,EAAG,IAAMA,EAAyB,gBAAgB,4BAA4B,CAAC,EAC5F,KAAK,CAAC,GAAO,CAAC,EAAG,IAAMA,EAAyB,aAAa,+BAAgC,EAAE,CAAC,EAChG,KAAK,CAAC,GAAO,CAAC,EAAG,IAAMA,EAAyB,aAAa,6BAA8B,EAAE,CAAC,EAC9F,IAAI,CAAA,CACR,EACD,CAAE,KAAM,KAAM,UAAW,EAAI,CAAA,EAC7B,QAAQI,CAAU,CAAA,CAExB,CACF,CAAC"}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{b as N,g as L,R as T,m as l,n as o,C as m,o as c,p as f,q as p,s as u}from"./utils.DS2YS0tX.js";import{a0 as a}from"./exports.1ijyAKMZ.js";import{P as E}from"./index-c1cc4c86.RjqwfILA.js";const I=N(f),i=L(p),S=L(u),s=new Map;T.forEachWithIndex(i,(_,r)=>{a(r,E.flatMap(t=>t.getAttribute(l)),E.tap(t=>{s.set(t,[r,S[_]])}))});document.addEventListener("DOMContentLoaded",()=>{I.addEventListener("click",_=>{const r=_.target;a(r,E.fromPredicate(t=>t.className===m),E.mapNullable(t=>t.parentElement),E.flatMap(t=>t.getAttribute(l)),E.tap(t=>{a(E.fromNullable(s.get(t)),E.tap(T.forEach(e=>e.removeAttribute(o))))})),a(r,E.fromPredicate(t=>t.className===c),E.flatMap(t=>t.getAttribute(l)),E.tap(t=>{if(r.hasAttribute(o)){a(E.fromNullable(s.get(t)),E.tap(T.forEach(e=>e.removeAttribute(o))));return}a(Array.from(s.values()),T.flat,T.forEach(e=>e.removeAttribute(o))),a(E.fromNullable(s.get(t)),E.tap(T.forEach(e=>e.toggleAttribute(o))))}))})});
|
|
||||||
//# sourceMappingURL=scripts-page-a-propos.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{b as o,g as S,t as g,u as l,R as N,v as i,f as O}from"./utils.DS2YS0tX.js";import{e as G}from"./nombres.n4VPN7qr.js";import{a0 as m}from"./exports.1ijyAKMZ.js";import{P as s}from"./index-c1cc4c86.RjqwfILA.js";const c=()=>{const e={CONTENEUR_STORYTELLING:o(".storytelling__conteneur"),IMAGES_STORYTELLING:S(g),STORYTELLING:o(l)};let E=e.IMAGES_STORYTELLING.at(0)?.getBoundingClientRect().height??0,n=0;const r=(t,T)=>{t.toggleAttribute(i,T),t.toggleAttribute(O,T)},I=()=>{E=m(N.getBy(e.IMAGES_STORYTELLING,t=>!t.hasAttribute(i)),s.map(t=>t.getBoundingClientRect().height),s.getWithDefault(0)),e.CONTENEUR_STORYTELLING.style.minHeight=`${String(E*e.IMAGES_STORYTELLING.length+61)}px`,e.CONTENEUR_STORYTELLING.style.maxHeight=`${String(E*e.IMAGES_STORYTELLING.length+61)}px`},L=()=>{n=e.STORYTELLING.scrollTop,e.IMAGES_STORYTELLING.forEach((t,T)=>{const a=E*T,R=E*(T+1);r(t,!G(n,a,R))})};new ResizeObserver(()=>{I(),L()}).observe(e.STORYTELLING),e.STORYTELLING.addEventListener("scroll",()=>L())};document.addEventListener("DOMContentLoaded",()=>{c()});
|
|
||||||
//# sourceMappingURL=scripts-page-accueil.js.map
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"scripts-page-accueil.js","sources":["../../src/scripts/scripts-page-accueil.ts"],"sourcesContent":["// Scripts pour la Page d'accueil\n\nimport { A, O, pipe } from \"@mobily/ts-belt\";\n\nimport {\n ATTRIBUT_ARIA_HIDDEN,\n ATTRIBUT_CACHE,\n SELECTEUR_CONTENEUR_STORYTELLING,\n SELECTEUR_IMAGES_STORYTELLING,\n} from \"./constantes/dom.ts\";\nimport { estEntreDeuxNombres } from \"./lib/nombres.ts\";\nimport { recupereEleOuLeve, recupereElesOuLeve } from \"./lib/utils.ts\";\n\nconst initialiseScrollStorytelling = (): void => {\n const E = {\n /** Le conteneur des images du storytelling. */\n CONTENEUR_STORYTELLING: recupereEleOuLeve<HTMLElement>(\".storytelling__conteneur\"),\n /** Les images du storytelling. */\n IMAGES_STORYTELLING: recupereElesOuLeve<HTMLDivElement>(SELECTEUR_IMAGES_STORYTELLING),\n /** Le bloc contenant le storytelling. */\n STORYTELLING: recupereEleOuLeve<HTMLElement>(SELECTEUR_CONTENEUR_STORYTELLING),\n };\n\n /** La hauteur d'une image du storytelling. */\n let hauteurImage = E.IMAGES_STORYTELLING.at(0)?.getBoundingClientRect().height ?? 0;\n /** La position du défilement (en pixels) du Conteneur des images du storytelling. */\n let positionDefilementConteneur = 0;\n\n /**\n * TODO\n * @param image\n * @param visible\n */\n const changeVisibiliteImage = (image: HTMLDivElement, visible: boolean) => {\n image.toggleAttribute(ATTRIBUT_CACHE, visible);\n image.toggleAttribute(ATTRIBUT_ARIA_HIDDEN, visible);\n };\n\n /**\n * TODO\n */\n const majDimensions = (): void => {\n hauteurImage = pipe(\n A.getBy(E.IMAGES_STORYTELLING, (i: HTMLDivElement) => !i.hasAttribute(ATTRIBUT_CACHE)),\n O.map((i: HTMLDivElement) => i.getBoundingClientRect().height),\n O.getWithDefault(0),\n );\n E.CONTENEUR_STORYTELLING.style.minHeight = `${String(hauteurImage * E.IMAGES_STORYTELLING.length + 61)}px`;\n E.CONTENEUR_STORYTELLING.style.maxHeight = `${String(hauteurImage * E.IMAGES_STORYTELLING.length + 61)}px`;\n };\n\n /**\n * TODO\n */\n const majImages = (): void => {\n // Met à jour la position du défilement dans le Conteneur\n positionDefilementConteneur = E.STORYTELLING.scrollTop;\n\n // Met à jour l'attribut de visibilité des images en fonction du défilement\n E.IMAGES_STORYTELLING.forEach((image: HTMLDivElement, index: number): void => {\n const debutYImage = hauteurImage * index;\n const finYImage = hauteurImage * (index + 1);\n\n changeVisibiliteImage(image, !estEntreDeuxNombres(positionDefilementConteneur, debutYImage, finYImage));\n });\n };\n\n // Initialise l'Observateur de Redimensionnement (ResizeObserver)\n new ResizeObserver((): void => {\n majDimensions();\n majImages();\n }).observe(E.STORYTELLING);\n\n // Initialise la mise à jour des images au défilement sur le Conteneur\n E.STORYTELLING.addEventListener(\"scroll\", (): void => majImages());\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", (): void => {\n initialiseScrollStorytelling();\n});\n"],"names":["initialiseScrollStorytelling","E","recupereEleOuLeve","recupereElesOuLeve","SELECTEUR_IMAGES_STORYTELLING","SELECTEUR_CONTENEUR_STORYTELLING","hauteurImage","positionDefilementConteneur","changeVisibiliteImage","image","visible","ATTRIBUT_CACHE","ATTRIBUT_ARIA_HIDDEN","majDimensions","pipe","A","i","O","majImages","index","debutYImage","finYImage","estEntreDeuxNombres"],"mappings":"wNAaA,MAAMA,EAA+B,IAAY,CAC/C,MAAMC,EAAI,CAER,uBAAwBC,EAA+B,0BAA0B,EAEjF,oBAAqBC,EAAmCC,CAA6B,EAErF,aAAcF,EAA+BG,CAAgC,CAC/E,EAGI,IAAAC,EAAeL,EAAE,oBAAoB,GAAG,CAAC,GAAG,wBAAwB,QAAU,EAE9EM,EAA8B,EAO5B,MAAAC,EAAwB,CAACC,EAAuBC,IAAqB,CACnED,EAAA,gBAAgBE,EAAgBD,CAAO,EACvCD,EAAA,gBAAgBG,EAAsBF,CAAO,CACrD,EAKMG,EAAgB,IAAY,CACjBP,EAAAQ,EACbC,EAAE,MAAMd,EAAE,oBAAsBe,GAAsB,CAACA,EAAE,aAAaL,CAAc,CAAC,EACrFM,EAAE,IAAKD,GAAsBA,EAAE,wBAAwB,MAAM,EAC7DC,EAAE,eAAe,CAAC,CACpB,EACEhB,EAAA,uBAAuB,MAAM,UAAY,GAAG,OAAOK,EAAeL,EAAE,oBAAoB,OAAS,EAAE,CAAC,KACpGA,EAAA,uBAAuB,MAAM,UAAY,GAAG,OAAOK,EAAeL,EAAE,oBAAoB,OAAS,EAAE,CAAC,IACxG,EAKMiB,EAAY,IAAY,CAE5BX,EAA8BN,EAAE,aAAa,UAG7CA,EAAE,oBAAoB,QAAQ,CAACQ,EAAuBU,IAAwB,CAC5E,MAAMC,EAAcd,EAAea,EAC7BE,EAAYf,GAAgBa,EAAQ,GAE1CX,EAAsBC,EAAO,CAACa,EAAoBf,EAA6Ba,EAAaC,CAAS,CAAC,CAAA,CACvG,CACH,EAGA,IAAI,eAAe,IAAY,CACfR,EAAA,EACJK,EAAA,CAAA,CACX,EAAE,QAAQjB,EAAE,YAAY,EAGzBA,EAAE,aAAa,iBAAiB,SAAU,IAAYiB,GAAW,CACnE,EAEA,SAAS,iBAAiB,mBAAoB,IAAY,CAC3BlB,EAAA,CAC/B,CAAC"}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
import{z as O,N as n}from"./index.CuMLbxmh.js";import{o as m,a as _,n as N,c as D,s as R,j as U,V as g}from"./validation.p-hUfG_o.js";import{h as P}from"./api.DpNqIphF.js";import{b as i,R as o,g as I,r as v,ar as M,as as F,at as B,au as w,av as H,aw as G,ax as y,ay as J,az as V,aA as x,aB as k,aC as l,aD as C,G as h,V as q,B as u,aE as W,D as S,E as L,F as d,a1 as X,I as c,ac as j,f as z}from"./utils.DS2YS0tX.js";import{E as A,l as $,e as Q,p as K,c as Y}from"./reseau.C8CWV2JS.js";import{a as Z}from"./gardes.CUgVnuaB.js";import{g as ee,d as te}from"./messages.Qx8X6YMT.js";import{a0 as p}from"./exports.1ijyAKMZ.js";import{t as re}from"./index-c1cc4c86.RjqwfILA.js";const Ee=m({attribute:R(),value:R()}),ae=m({id:_(N()),quantity:_(N()),variation:_(D(Ee))}),f=_etats,se=s=>j(s,t=>{t.at(0)?.setAttribute(z,"false"),t.at(1)?.setAttribute(h,"true")}),e={BOUTON_AJOUT_PANIER:i(F),CONTENEUR_FLECHES_DEFILEMENT:i(B),FLECHE_DEFILEMENT_DROITE:i(w),FLECHE_DEFILEMENT_GAUCHE:i(H),IMAGES:o.flat([i(G),I(y)]),LIENS_ONGLETS:I(J),PHOTOS_PRODUIT:i(V),PRIX_PRODUIT:i(x),SECTIONS_CONTENUS:I(k),SELECTEUR_VARIATION:v(M)},ie=()=>{const s=()=>Number(e.PHOTOS_PRODUIT.getAttribute(l));o.forEachWithIndex([e.IMAGES.at(0),e.IMAGES.at(-1)],(t,r)=>{r&&(new IntersectionObserver(o.forEach(a=>O([a.isIntersecting,t]).with([!0,0],()=>e.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-debut")).with([!0,1],()=>e.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-fin")).with([!1,0],()=>e.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-debut","")).with([!1,1],()=>e.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-fin","")).otherwise(()=>{})),{root:null,rootMargin:"100% 0% 100% 0%",threshold:.5}).observe(r),o.forEachWithIndex(e.IMAGES,(a,E)=>new IntersectionObserver(o.forEach(T=>{T.isIntersecting&&e.PHOTOS_PRODUIT.setAttribute(l,String(a))}),{root:null,rootMargin:"100% 0% 100% 0%",threshold:.5}).observe(E)),e.FLECHE_DEFILEMENT_GAUCHE.addEventListener("click",()=>e.IMAGES[s()-1]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})),e.FLECHE_DEFILEMENT_DROITE.addEventListener("click",()=>e.IMAGES[s()+1]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})))})},ne=()=>{const s=new Map;e.LIENS_ONGLETS.forEach((t,r)=>{const a=t.getAttribute("id"),E=e.SECTIONS_CONTENUS[r];if(!a)throw new Error("Le lien ne dispose pas d'ID !");if(!E)throw new Error("Le lien ne dispose pas de section correspondante !");s.set(a,[t,E]),t.addEventListener("click",T=>{T.preventDefault();const b=t.getAttribute(C)==="true";se(p(s.values(),Array.from)),!b&&(t.setAttribute(C,"true"),E.removeAttribute(h))})}),e.SELECTEUR_VARIATION.ifRight(t=>t.addEventListener("change",r=>{const a=q.fromNullable(r.target).filter(Z);a.map(E=>E.validity.valid).ifJust(E=>e.BOUTON_AJOUT_PANIER.toggleAttribute(u,!E)),a.chainNullable(E=>E.selectedOptions[0]).chainNullable(E=>E.getAttribute(W)).ifJust(E=>{e.PRIX_PRODUIT.textContent=`${E}€`})})),e.BOUTON_AJOUT_PANIER.addEventListener("click",()=>oe())},oe=()=>{const s={id:e.SELECTEUR_VARIATION.map(t=>Number(t.value)).orDefault(f.idProduit),quantity:1};A.liftEither(U(s,ae)).ifRight(()=>{e.BOUTON_AJOUT_PANIER.setAttribute(u,""),e.BOUTON_AJOUT_PANIER.setAttribute(S,""),$(e.BOUTON_AJOUT_PANIER,500)}).chain(t=>Q(K({corps:JSON.stringify(t),nonce:f.nonce,route:P}))).chain(t=>A(async({throwE:r})=>O(await Y(t)).with({status:500},()=>r(new L("500 Server Error"))).with({status:400},()=>r(new d("400 Bad Request Error"))).with({status:201},a=>a.body).otherwise(a=>r(new Error(`Erreur inconnue ${String(a.status)}`))))).chain(t=>A.liftEither(U(t,te))).ifRight(t=>p(X(t,"items_count"),re(r=>{e.BOUTON_AJOUT_PANIER.textContent="Added to cart!",ee({quantiteProduits:r})}))).ifLeft(t=>{O(t).with(n.instanceOf(g),r=>{c(r),console.error(r.issues)}).with(n.instanceOf(L),n.instanceOf(d),r=>{c(r),console.error(r)}).with(n.instanceOf(DOMException),n.instanceOf(TypeError),n.instanceOf(Error),r=>{c(r),console.error(r)}).exhaustive(),e.BOUTON_AJOUT_PANIER.textContent="Add to cart"}).finally(()=>{e.BOUTON_AJOUT_PANIER.removeAttribute(S),e.BOUTON_AJOUT_PANIER.removeAttribute(u)}).run()};document.addEventListener("DOMContentLoaded",()=>{ne(),ie()});
|
|
||||||
//# sourceMappingURL=scripts-page-produit.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -25,14 +25,12 @@ Timber::$dirname = ["views"];
|
||||||
|
|
||||||
// Charge les Scripts du thème (report d'erreurs)
|
// Charge les Scripts du thème (report d'erreurs)
|
||||||
function charge_scripts_haiku_atelier_2024(): void {
|
function charge_scripts_haiku_atelier_2024(): void {
|
||||||
if (env("WP_ENV") == "production") {
|
wp_enqueue_script_module(
|
||||||
wp_enqueue_script_module(
|
id: "haiku-atelier-2024-gaffe",
|
||||||
id: "haiku-atelier-2024-gaffe",
|
deps: [],
|
||||||
deps: [],
|
src: get_template_directory_uri() . "/assets/js/gaffe.js",
|
||||||
src: get_template_directory_uri() . "/assets/js/gaffe.js",
|
version: filemtime(get_template_directory() . "/assets/js/gaffe.js"),
|
||||||
version: filemtime(get_template_directory() . "/assets/js/gaffe.js"),
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
wp_enqueue_script_module(
|
wp_enqueue_script_module(
|
||||||
id: "haiku-atelier-2024-bouton-panier",
|
id: "haiku-atelier-2024-bouton-panier",
|
||||||
deps: [],
|
deps: [],
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import { pipe } from "@mobily/ts-belt";
|
||||||
import {
|
import {
|
||||||
breadcrumbsIntegration,
|
breadcrumbsIntegration,
|
||||||
BrowserClient,
|
BrowserClient,
|
||||||
|
captureConsoleIntegration,
|
||||||
createTransport,
|
createTransport,
|
||||||
dedupeIntegration,
|
dedupeIntegration,
|
||||||
defaultStackParser,
|
defaultStackParser,
|
||||||
|
|
@ -53,9 +54,10 @@ const creeTransportFetch = (options: BrowserTransportOptions): Transport => {
|
||||||
/* Créé la configuration Sentry */
|
/* Créé la configuration Sentry */
|
||||||
const client = new BrowserClient({
|
const client = new BrowserClient({
|
||||||
dsn: import.meta.env.VITE_GLITCHTIP_NSD,
|
dsn: import.meta.env.VITE_GLITCHTIP_NSD,
|
||||||
environment: "production",
|
environment: import.meta.env.VITE_MODE,
|
||||||
integrations: [
|
integrations: [
|
||||||
breadcrumbsIntegration(),
|
breadcrumbsIntegration(),
|
||||||
|
captureConsoleIntegration(),
|
||||||
dedupeIntegration(),
|
dedupeIntegration(),
|
||||||
functionToStringIntegration(),
|
functionToStringIntegration(),
|
||||||
globalHandlersIntegration(),
|
globalHandlersIntegration(),
|
||||||
|
|
@ -65,7 +67,7 @@ const client = new BrowserClient({
|
||||||
],
|
],
|
||||||
sendDefaultPii: true,
|
sendDefaultPii: true,
|
||||||
stackParser: defaultStackParser,
|
stackParser: defaultStackParser,
|
||||||
tracesSampleRate: 0.01,
|
tracesSampleRate: 1,
|
||||||
transport: creeTransportFetch,
|
transport: creeTransportFetch,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ export const emetMessageMajContenuPanier = (args: MessageMajContenuPanierDonnees
|
||||||
* @param message Le message émis.
|
* @param message Le message émis.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
export const emetUniqueMessageCanal = <M>(nomCanal: string, message: M): void =>
|
export const emetUniqueMessageBroadcastChannel = <M>(nomCanal: string, message: M): void =>
|
||||||
pipe(new BroadcastChannel(nomCanal), canal => canalPostMessage(canal, message), canal => canal.close());
|
pipe(new BroadcastChannel(nomCanal), canal => canalPostMessage(canal, message), canal => canal.close());
|
||||||
|
|
||||||
// Validations
|
// Validations
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { D, pipe } from "@mobily/ts-belt";
|
import { D, pipe } from "@mobily/ts-belt";
|
||||||
import { type Either, Maybe } from "purify-ts";
|
import { type Either, Maybe } from "purify-ts";
|
||||||
|
|
||||||
|
import { ATTRIBUT_CHARGEMENT, ATTRIBUT_DESACTIVE } from "../constantes/dom.ts";
|
||||||
|
import { lanceAnimationCycleLoading } from "./animations.ts";
|
||||||
import {
|
import {
|
||||||
recupereElementAvecSelecteur,
|
recupereElementAvecSelecteur,
|
||||||
recupereElementOuLeve,
|
recupereElementOuLeve,
|
||||||
|
|
@ -52,3 +54,17 @@ export const recupereElesOuLeve = <E extends Element = Element>(selecteur: strin
|
||||||
recupereElementsDocumentEither<E>(selecteur),
|
recupereElementsDocumentEither<E>(selecteur),
|
||||||
recupereElementsOuLeve,
|
recupereElementsOuLeve,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const majEtatChargementBouton = (bouton: HTMLButtonElement, activation: boolean): void => {
|
||||||
|
if (activation) {
|
||||||
|
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||||
|
bouton.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||||
|
bouton.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||||
|
// Lance un cycle d'animation sur le texte de chargement
|
||||||
|
lanceAnimationCycleLoading(bouton, 500);
|
||||||
|
} else {
|
||||||
|
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||||
|
bouton.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||||
|
bouton.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import type { FetchErrors } from "../lib/types/reseau";
|
||||||
import { ROUTE_API_MAJ_CLIENT, ROUTE_API_NOUVELLE_COMMANDES } from "../constantes/api";
|
import { ROUTE_API_MAJ_CLIENT, ROUTE_API_NOUVELLE_COMMANDES } from "../constantes/api";
|
||||||
import {
|
import {
|
||||||
ATTRIBUT_CHARGEMENT,
|
ATTRIBUT_CHARGEMENT,
|
||||||
ATTRIBUT_DESACTIVE,
|
|
||||||
ATTRIBUT_LIVRAISON_VALIDEE,
|
ATTRIBUT_LIVRAISON_VALIDEE,
|
||||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE,
|
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE,
|
||||||
SELECTEUR_BOUTON_SEPARATION_ADRESSES,
|
SELECTEUR_BOUTON_SEPARATION_ADRESSES,
|
||||||
|
|
@ -36,11 +35,10 @@ import {
|
||||||
ERREUR_GENERIQUE_RESEAU,
|
ERREUR_GENERIQUE_RESEAU,
|
||||||
ERREUR_GENERIQUE_SOUMISSION_ADRESSES,
|
ERREUR_GENERIQUE_SOUMISSION_ADRESSES,
|
||||||
} from "../constantes/messages-utilisateur";
|
} from "../constantes/messages-utilisateur";
|
||||||
import { lanceAnimationCycleLoading } from "../lib/animations";
|
|
||||||
import { eitherJsonParse, eitherSessionStorageGet } from "../lib/dom";
|
import { eitherJsonParse, eitherSessionStorageGet } from "../lib/dom";
|
||||||
import { BadRequestError, leveErreur, NonExistingKeyError, reporteErreur, ServerError } from "../lib/erreurs";
|
import { BadRequestError, leveErreur, NonExistingKeyError, reporteErreur, ServerError } from "../lib/erreurs";
|
||||||
import { ErreurAdresseInvalide } from "../lib/erreurs/adresses";
|
import { ErreurAdresseInvalide } from "../lib/erreurs/adresses";
|
||||||
import { emetUniqueMessageCanal } from "../lib/messages";
|
import { emetUniqueMessageBroadcastChannel } from "../lib/messages";
|
||||||
import { diviseParCent, formateEnEuros } from "../lib/nombres";
|
import { diviseParCent, formateEnEuros } from "../lib/nombres";
|
||||||
import { creeReponseSimplifiee, eitherAsyncFetch, postBackend } from "../lib/reseau";
|
import { creeReponseSimplifiee, eitherAsyncFetch, postBackend } from "../lib/reseau";
|
||||||
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
||||||
|
|
@ -48,7 +46,7 @@ import { WCStoreCartUpdateCustomerArgsSchema } from "../lib/schemas/api/cart-upd
|
||||||
import { WCStoreShippingRateShippingRatesSchema } from "../lib/schemas/api/couts-livraison";
|
import { WCStoreShippingRateShippingRatesSchema } from "../lib/schemas/api/couts-livraison";
|
||||||
import { estWCAddressError } from "../lib/schemas/api/erreurs";
|
import { estWCAddressError } from "../lib/schemas/api/erreurs";
|
||||||
import { WCV3OrdersArgsSchema, WCV3OrderSchema } from "../lib/schemas/api/v3/orders";
|
import { WCV3OrdersArgsSchema, WCV3OrderSchema } from "../lib/schemas/api/v3/orders";
|
||||||
import { recupereElementsDocumentEither, recupereEleOuLeve } from "../lib/utils";
|
import { majEtatChargementBouton, recupereElementsDocumentEither, recupereEleOuLeve } from "../lib/utils";
|
||||||
import { eitherParse } from "../lib/validation";
|
import { eitherParse } from "../lib/validation";
|
||||||
|
|
||||||
// @ts-expect-error -- États injectés par le modèle PHP
|
// @ts-expect-error -- États injectés par le modèle PHP
|
||||||
|
|
@ -66,33 +64,53 @@ const E = {
|
||||||
TOTAL_LIVRAISON_PRESTATAIRE: recupereEleOuLeve<HTMLSpanElement>(SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE),
|
TOTAL_LIVRAISON_PRESTATAIRE: recupereEleOuLeve<HTMLSpanElement>(SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mepCanalRevalidationLivraison = (): void => {
|
/**
|
||||||
new BroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON).addEventListener("message", () => {
|
* Initialise l'écoute sur le `BroadcastChannel` de revalidation de la livraison.
|
||||||
|
*
|
||||||
|
* Lorsqu'un Message est émis, force l'Utilisateur à réaliser une requête pour le recalcul de ses conditions de
|
||||||
|
* livraison.
|
||||||
|
*
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export const initialiseCanalRevalidationLivraison = (): void => {
|
||||||
|
new BroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON).addEventListener("message", (): void => {
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_LIVRAISON_VALIDEE);
|
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_LIVRAISON_VALIDEE);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Submit the addresses";
|
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Calculate shipping";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lorsque le Formulaire du Panier change (que l'Utilisateur a changé une valeur), demande une revalidation
|
||||||
|
* de la livraison si elle a été précédemment validée.
|
||||||
|
*
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export const demandeRevalidationLivraisonAMajFormulaires = (): void =>
|
||||||
|
E.FORMULAIRE_PANIER.addEventListener("change", (): void => {
|
||||||
|
Maybe
|
||||||
|
.fromFalsy(E.FORMULAIRE_PANIER.checkValidity())
|
||||||
|
.chainNullable((): boolean => E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE))
|
||||||
|
.ifJust((): void => emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true));
|
||||||
|
});
|
||||||
|
|
||||||
export const initialiseBoutonCalculLivraison = (): void => {
|
export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
// Déclenche la requête pour la soumission des adresses
|
// Déclenche la requête pour la soumission des adresses
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => {
|
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event): void => {
|
||||||
Maybe
|
Maybe
|
||||||
// Ne fais rien si le Formulaire n'est pas valide
|
// Ne fais rien si le Formulaire n'est pas valide
|
||||||
.fromFalsy(
|
.fromFalsy(E.FORMULAIRE_PANIER.checkValidity())
|
||||||
E.FORMULAIRE_PANIER.checkValidity() && !E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE),
|
// Ne fais rien si la livraison a déjà été validée
|
||||||
)
|
.chainNullable((): boolean => !E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE))
|
||||||
.ifJust(() => {
|
.ifJust((): void => {
|
||||||
evenement.preventDefault();
|
evenement.preventDefault();
|
||||||
|
|
||||||
/** Les adresses de livraison et facturation sont-elles renseignables séparéments ? */
|
/** Les adresses de livraison et facturation sont-elles renseignables séparément ? */
|
||||||
const adressesSontSeparees = E.BOUTON_SEPARATION_ADRESSES.checked;
|
const adressesSontSeparees = E.BOUTON_SEPARATION_ADRESSES.checked;
|
||||||
|
|
||||||
/** Les données du Formulaire sans caractères vides. */
|
/** Les données du Formulaire sans caractères vides. */
|
||||||
const donneesFormulaire: Record<string, string> = pipe(
|
const donneesFormulaire: Record<string, string> = pipe(
|
||||||
Object.fromEntries(new FormData(E.FORMULAIRE_PANIER)) as Record<string, string>,
|
Object.fromEntries(new FormData(E.FORMULAIRE_PANIER)) as Record<string, string>,
|
||||||
dictMap(stringTrim),
|
dictMap(stringTrim),
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Les données du Formulaire transformées en arguments pour la requête vers le Backend. */
|
/** Les données du Formulaire transformées en arguments pour la requête vers le Backend. */
|
||||||
const argumentsFormulaire: WCStoreCartUpdateCustomerArgs = {
|
const argumentsFormulaire: WCStoreCartUpdateCustomerArgs = {
|
||||||
billing_address: {
|
billing_address: {
|
||||||
|
|
@ -129,22 +147,14 @@ export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
// 1. Valide les Arguments de la Requête
|
// 1. Valide les Arguments de la Requête
|
||||||
.liftEither(eitherParse(argumentsFormulaire, WCStoreCartUpdateCustomerArgsSchema))
|
.liftEither(eitherParse(argumentsFormulaire, WCStoreCartUpdateCustomerArgsSchema))
|
||||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
||||||
.ifRight(() => {
|
.ifRight((): void => {
|
||||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
majEtatChargementBouton(E.BOUTON_ACTIONS_FORMULAIRE, true);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
|
||||||
|
|
||||||
// Lance un cycle d'animation sur le texte de chargement
|
|
||||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
|
||||||
})
|
})
|
||||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||||
.chain((args: WCStoreCartUpdateCustomerArgs) =>
|
.chain((args: WCStoreCartUpdateCustomerArgs) =>
|
||||||
eitherAsyncFetch(
|
eitherAsyncFetch(
|
||||||
postBackend({
|
postBackend({ corps: JSON.stringify(args), nonce: ETATS_PAGE.nonce, route: ROUTE_API_MAJ_CLIENT }),
|
||||||
corps: JSON.stringify(args),
|
|
||||||
nonce: ETATS_PAGE.nonce,
|
|
||||||
route: ROUTE_API_MAJ_CLIENT,
|
|
||||||
}),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||||
|
|
@ -152,21 +162,21 @@ export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
EitherAsync<BadRequestError | ErreurAdresseInvalide | ServerError, unknown>(async ({ throwE }) =>
|
EitherAsync<BadRequestError | ErreurAdresseInvalide | ServerError, unknown>(async ({ throwE }) =>
|
||||||
// Simplifie les données à matcher
|
// Simplifie les données à matcher
|
||||||
match(await creeReponseSimplifiee(reponse))
|
match(await creeReponseSimplifiee(reponse))
|
||||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
.with({ status: 200 }, rs => rs.body)
|
||||||
// Problème d'adresse
|
// Problème d'adresse
|
||||||
.with({
|
.with({
|
||||||
body: P.when(body => estWCAddressError(body)),
|
body: P.when(body => estWCAddressError(body)),
|
||||||
status: 400,
|
status: 400,
|
||||||
}, erreur => throwE(new ErreurAdresseInvalide(erreur.body.data.params)))
|
}, (r): never => throwE(new ErreurAdresseInvalide(r.body.data.params)))
|
||||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
.with({ status: 400 }, (): never => throwE(new BadRequestError("400 Bad Request Error")))
|
||||||
.with({ status: 200 }, r => r.body)
|
.with({ status: 500 }, (): never => throwE(new ServerError("500 Server Error")))
|
||||||
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
.otherwise((rs): never => throwE(new Error(`Erreur inconnue ${String(rs.status)}`)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// 5. Vérifie le Schéma de la Réponse
|
// 5. Vérifie le Schéma de la Réponse
|
||||||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema)))
|
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema)))
|
||||||
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||||
.ifRight((panier: WCStoreCart) => {
|
.ifRight((panier: WCStoreCart): void => {
|
||||||
E.MESSAGE_ADRESSES.textContent = " ";
|
E.MESSAGE_ADRESSES.textContent = " ";
|
||||||
|
|
||||||
const sousTotalLivraison = panier.totals.total_shipping === 0
|
const sousTotalLivraison = panier.totals.total_shipping === 0
|
||||||
|
|
@ -190,31 +200,37 @@ export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_LIVRAISON_VALIDEE, "");
|
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_LIVRAISON_VALIDEE, "");
|
||||||
})
|
})
|
||||||
|
// 7. Traite les Erreurs et affiche un message à l'Utilisateur
|
||||||
.ifLeft(
|
.ifLeft(
|
||||||
(erreur: BadRequestError | ErreurAdresseInvalide | FetchErrors | ServerError | ValiError<AnySchema>) => {
|
(
|
||||||
|
erreur: BadRequestError | ErreurAdresseInvalide | FetchErrors | ServerError | ValiError<AnySchema>,
|
||||||
|
): void => {
|
||||||
match(erreur)
|
match(erreur)
|
||||||
.with(P.instanceOf(ValiError), e => {
|
.with(P.instanceOf(ValiError), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e.issues);
|
console.error(e.issues);
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
})
|
})
|
||||||
.with(P.instanceOf(ErreurAdresseInvalide), e => {
|
.with(P.instanceOf(ErreurAdresseInvalide), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e, e.problemes);
|
console.error(e, e.problemes);
|
||||||
match(e.problemes)
|
match(e.problemes)
|
||||||
.when(p => pipe(dictValues(p), arrayFind(c => c === "The provided postcode is not valid")), () => {
|
.when(
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_ADRESSE_MAUVAIS_CODE_POSTAL;
|
p => pipe(dictValues(p), arrayFind(c => c === "The provided postcode is not valid")),
|
||||||
})
|
(): void => {
|
||||||
.otherwise(() => {
|
E.MESSAGE_ADRESSES.textContent = ERREUR_ADRESSE_MAUVAIS_CODE_POSTAL;
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.otherwise((): void => {
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.with(P.instanceOf(ServerError), P.instanceOf(BadRequestError), e => {
|
.with(P.instanceOf(ServerError), P.instanceOf(BadRequestError), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
})
|
})
|
||||||
.with(P.instanceOf(DOMException), P.instanceOf(TypeError), P.instanceOf(Error), e => {
|
.with(P.instanceOf(DOMException), P.instanceOf(TypeError), P.instanceOf(Error), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_RESEAU;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_RESEAU;
|
||||||
|
|
@ -224,30 +240,29 @@ export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Submit your addresses";
|
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Submit your addresses";
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.finally(() => {
|
.finally((): void => {
|
||||||
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
majEtatChargementBouton(E.BOUTON_ACTIONS_FORMULAIRE, false);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
|
||||||
})
|
})
|
||||||
.run();
|
.run();
|
||||||
})
|
})
|
||||||
.ifNothing(() => evenement.preventDefault());
|
.ifNothing((): void => evenement.preventDefault());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const initialiseBoutonCreationCommande = (): void => {
|
export const initialiseBoutonCreationCommande = (): void => {
|
||||||
// Créé la Commande au clic sur le Bouton
|
// Créé la Commande au clic sur le Bouton
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => {
|
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event): void => {
|
||||||
Maybe
|
Maybe
|
||||||
// Ne fais rien si le Formulaire n'est pas valide
|
// Ne fais rien si le Formulaire n'est pas valide
|
||||||
.fromFalsy(
|
.fromFalsy(
|
||||||
E.FORMULAIRE_PANIER.checkValidity() && E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE),
|
E.FORMULAIRE_PANIER.checkValidity() && E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE),
|
||||||
)
|
)
|
||||||
// Active l'état de chargement
|
// Active l'état de chargement
|
||||||
.ifJust(() => {
|
.ifJust((): void => {
|
||||||
evenement.preventDefault();
|
evenement.preventDefault();
|
||||||
|
|
||||||
/** Les adresses de livraison et facturation sont-elles renseignables séparéments ? */
|
/** Les adresses de livraison et facturation sont-elles renseignables séparément ? */
|
||||||
const adressesSontSeparees = E.BOUTON_SEPARATION_ADRESSES.checked;
|
const adressesSontSeparees = E.BOUTON_SEPARATION_ADRESSES.checked;
|
||||||
|
|
||||||
/** Les données du Formulaire sans caractères vides. */
|
/** Les données du Formulaire sans caractères vides. */
|
||||||
|
|
@ -256,31 +271,31 @@ export const initialiseBoutonCreationCommande = (): void => {
|
||||||
dictMap(stringTrim),
|
dictMap(stringTrim),
|
||||||
);
|
);
|
||||||
|
|
||||||
/** La méthode de livraison sélectionée ; interrompt la requête si incorrect. */
|
/** La méthode de livraison sélectionnée ; interrompt la requête si incorrect. */
|
||||||
const methodeLivraison: WCStoreShippingRateShippingRate = eitherSessionStorageGet("shipping_rates")
|
const methodeLivraison: WCStoreShippingRateShippingRate = eitherSessionStorageGet("shipping_rates")
|
||||||
// Récupère la méthode de livraison depuis le stockage de session sous forme d'objet
|
// Récupère la méthode de livraison depuis le stockage de session sous forme d'objet
|
||||||
.chain(eitherJsonParse)
|
.chain(eitherJsonParse)
|
||||||
// Vérifie la forme de l'objet récupéré
|
// Vérifie la forme de l'objet récupéré
|
||||||
.chain((json: JSONValue) => eitherParse(json, WCStoreShippingRateShippingRatesSchema))
|
.chain((json: JSONValue) => eitherParse(json, WCStoreShippingRateShippingRatesSchema))
|
||||||
// Traite de manière différenciée les Erreurs
|
// Traite de manière différenciée les Erreurs
|
||||||
.ifLeft((erreur: NonExistingKeyError | SyntaxError | ValiError<AnySchema>) => {
|
.ifLeft((erreur: NonExistingKeyError | SyntaxError | ValiError<AnySchema>): void => {
|
||||||
match(erreur)
|
match(erreur)
|
||||||
.with(P.instanceOf(ValiError), e => {
|
.with(P.instanceOf(ValiError), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e.issues);
|
console.error(e.issues);
|
||||||
})
|
})
|
||||||
.with(P.instanceOf(SyntaxError), P.instanceOf(NonExistingKeyError), e => {
|
.with(P.instanceOf(SyntaxError), P.instanceOf(NonExistingKeyError), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
})
|
})
|
||||||
.exhaustive();
|
.exhaustive();
|
||||||
|
|
||||||
// Nettoie un stockage de session erronné
|
// Nettoie un stockage de session erroné
|
||||||
sessionStorage.removeItem("shipping_rates");
|
sessionStorage.removeItem("shipping_rates");
|
||||||
|
|
||||||
// Rétablis le Formulaire à son état d'origine
|
// Rétablis le Formulaire à son état d'origine
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
|
|
||||||
// Interrompt la requête
|
// Interrompt la requête
|
||||||
leveErreur(erreur);
|
leveErreur(erreur);
|
||||||
|
|
@ -346,17 +361,12 @@ export const initialiseBoutonCreationCommande = (): void => {
|
||||||
// 1. Valide les Arguments de la Requête
|
// 1. Valide les Arguments de la Requête
|
||||||
.liftEither(eitherParse(argumentsFormulaire, WCV3OrdersArgsSchema))
|
.liftEither(eitherParse(argumentsFormulaire, WCV3OrdersArgsSchema))
|
||||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
||||||
.ifRight(() => {
|
.ifRight((): void => {
|
||||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
majEtatChargementBouton(E.BOUTON_ACTIONS_FORMULAIRE, true);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
|
||||||
|
|
||||||
// Lance un cycle d'animation sur le texte de chargement
|
|
||||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
|
||||||
})
|
})
|
||||||
// 3. Exécute la requête via fetch sous form d'EitherAsync
|
// 3. Exécute la requête via fetch sous form d'EitherAsync
|
||||||
.chain((args: WCV3OrdersArgs) =>
|
.chain((args: WCV3OrdersArgs) =>
|
||||||
EitherAsync<DOMException | Error | TypeError, Response>(() =>
|
EitherAsync<DOMException | Error | TypeError, Response>((): Promise<Response> =>
|
||||||
postBackend({
|
postBackend({
|
||||||
authString: ETATS_PAGE.authString,
|
authString: ETATS_PAGE.authString,
|
||||||
corps: JSON.stringify(args),
|
corps: JSON.stringify(args),
|
||||||
|
|
@ -367,18 +377,18 @@ export const initialiseBoutonCreationCommande = (): void => {
|
||||||
)
|
)
|
||||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||||
.chain((reponse: Response) =>
|
.chain((reponse: Response) =>
|
||||||
EitherAsync<APIFetchErrors, unknown>(async ({ throwE }) =>
|
EitherAsync<APIFetchErrors, unknown>(async ({ throwE }): Promise<unknown> =>
|
||||||
match(await creeReponseSimplifiee(reponse))
|
match(await creeReponseSimplifiee(reponse))
|
||||||
.with({ status: 500 }, () => throwE(new ServerError("500 Serveur Error")))
|
.with({ status: 201 }, (rs): unknown => rs.body)
|
||||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
.with({ status: 500 }, (): never => throwE(new ServerError("500 Serveur Error")))
|
||||||
.with({ status: 201 }, r => r.body)
|
.with({ status: 400 }, (): never => throwE(new BadRequestError("400 Bad Request Error")))
|
||||||
.run()
|
.run()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// 5. Vérifie le Schéma de la Réponse
|
// 5. Vérifie le Schéma de la Réponse
|
||||||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCV3OrderSchema)))
|
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCV3OrderSchema)))
|
||||||
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||||
.ifRight((commande: WCV3Order) => {
|
.ifRight((commande: WCV3Order): void => {
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "OK!";
|
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "OK!";
|
||||||
E.MESSAGE_ADRESSES.textContent = " ";
|
E.MESSAGE_ADRESSES.textContent = " ";
|
||||||
|
|
@ -388,9 +398,9 @@ export const initialiseBoutonCreationCommande = (): void => {
|
||||||
url.searchParams.append("order_id", String(commande.id));
|
url.searchParams.append("order_id", String(commande.id));
|
||||||
location.assign(url);
|
location.assign(url);
|
||||||
})
|
})
|
||||||
.ifLeft((erreur: BadRequestError | DOMException | ServerError | TypeError | ValiError<AnySchema>) => {
|
.ifLeft((erreur: BadRequestError | DOMException | ServerError | TypeError | ValiError<AnySchema>): void => {
|
||||||
match(erreur)
|
match(erreur)
|
||||||
.with(P.instanceOf(ValiError), e => {
|
.with(P.instanceOf(ValiError), (e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error("ValiError", e.issues);
|
console.error("ValiError", e.issues);
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_CREATION_COMMANDE;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_CREATION_COMMANDE;
|
||||||
|
|
@ -400,32 +410,23 @@ export const initialiseBoutonCreationCommande = (): void => {
|
||||||
P.instanceOf(DOMException),
|
P.instanceOf(DOMException),
|
||||||
P.instanceOf(ServerError),
|
P.instanceOf(ServerError),
|
||||||
P.instanceOf(TypeError),
|
P.instanceOf(TypeError),
|
||||||
e => {
|
(e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_CREATION_COMMANDE;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_CREATION_COMMANDE;
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.otherwise(e => {
|
.otherwise((e): void => {
|
||||||
reporteErreur(e);
|
reporteErreur(e);
|
||||||
console.error("erreur inconnu", e);
|
console.error("erreur inconnu", e);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
majEtatChargementBouton(E.BOUTON_ACTIONS_FORMULAIRE, false);
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
|
||||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Checkout";
|
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Checkout";
|
||||||
})
|
})
|
||||||
.run();
|
.run();
|
||||||
})
|
})
|
||||||
.ifNothing(() => evenement.preventDefault());
|
.ifNothing((): void => evenement.preventDefault());
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const revalideLorsMajFormulaires = (): void => {
|
|
||||||
E.FORMULAIRE_PANIER.addEventListener("change", () => {
|
|
||||||
if (E.FORMULAIRE_PANIER.checkValidity() && E.BOUTON_ACTIONS_FORMULAIRE.hasAttribute(ATTRIBUT_LIVRAISON_VALIDEE)) {
|
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import { accorderCibleASelecteur } from "../lib/dom";
|
||||||
import { reporteErreur, ServerError } from "../lib/erreurs";
|
import { reporteErreur, ServerError } from "../lib/erreurs";
|
||||||
import { ErreurCodePromoInvalide } from "../lib/erreurs/codes-promo";
|
import { ErreurCodePromoInvalide } from "../lib/erreurs/codes-promo";
|
||||||
import { estReponse500 } from "../lib/gardes";
|
import { estReponse500 } from "../lib/gardes";
|
||||||
import { emetUniqueMessageCanal, reponseEstCodeErreurWC } from "../lib/messages";
|
import { emetUniqueMessageBroadcastChannel, reponseEstCodeErreurWC } from "../lib/messages";
|
||||||
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "../lib/nombres";
|
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "../lib/nombres";
|
||||||
import { postBackend } from "../lib/reseau";
|
import { postBackend } from "../lib/reseau";
|
||||||
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
||||||
|
|
@ -141,7 +141,7 @@ export const initialiseElementsCodePromo = (): void => {
|
||||||
formateEnEuros,
|
formateEnEuros,
|
||||||
);
|
);
|
||||||
|
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
})
|
})
|
||||||
.ifLeft(erreur => {
|
.ifLeft(erreur => {
|
||||||
// Rétablis le texte d'origine
|
// Rétablis le texte d'origine
|
||||||
|
|
@ -225,7 +225,7 @@ export const initialiseElementsCodePromo = (): void => {
|
||||||
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||||
E.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
E.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
||||||
|
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
})
|
})
|
||||||
.ifLeft(erreur =>
|
.ifLeft(erreur =>
|
||||||
match(erreur)
|
match(erreur)
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import { pipe } from "@mobily/ts-belt";
|
||||||
import { forEach as arrayForEach, map as arrayMap } from "@mobily/ts-belt/Array";
|
import { forEach as arrayForEach, map as arrayMap } from "@mobily/ts-belt/Array";
|
||||||
import { EitherAsync, Maybe } from "purify-ts";
|
import { EitherAsync, Maybe } from "purify-ts";
|
||||||
import { match, P } from "ts-pattern";
|
import { match, P } from "ts-pattern";
|
||||||
|
import { type AnySchema, ValiError } from "valibot";
|
||||||
|
|
||||||
import type { WCStoreCart } from "../lib/types/api/cart";
|
import type { WCStoreCart } from "../lib/types/api/cart";
|
||||||
import type { WCStoreCartRemoveItemArgs } from "../lib/types/api/cart-remove-item";
|
import type { WCStoreCartRemoveItemArgs } from "../lib/types/api/cart-remove-item";
|
||||||
import type { WCStoreCartUpdateItemArgs } from "../lib/types/api/cart-update-item";
|
import type { WCStoreCartUpdateItemArgs } from "../lib/types/api/cart-update-item";
|
||||||
import type { ElementParent } from "../lib/types/dom";
|
import type { ElementParent } from "../lib/types/dom";
|
||||||
import type { EtatsPageGenerique } from "../lib/types/pages";
|
import type { EtatsPageGenerique } from "../lib/types/pages";
|
||||||
|
import type { FetchErrors } from "../lib/types/reseau";
|
||||||
|
|
||||||
import { ROUTE_API_MAJ_ARTICLE_PANIER, ROUTE_API_RETIRE_ARTICLE_PANIER } from "../constantes/api";
|
import { ROUTE_API_MAJ_ARTICLE_PANIER, ROUTE_API_RETIRE_ARTICLE_PANIER } from "../constantes/api";
|
||||||
import {
|
import {
|
||||||
|
|
@ -23,8 +25,12 @@ import {
|
||||||
} from "../constantes/dom";
|
} from "../constantes/dom";
|
||||||
import { NOM_CANAL_REVALIDATION_LIVRAISON } from "../constantes/messages";
|
import { NOM_CANAL_REVALIDATION_LIVRAISON } from "../constantes/messages";
|
||||||
import { recupereElementAvecSelecteur, recupereElementOuLeve } from "../lib/dom";
|
import { recupereElementAvecSelecteur, recupereElementOuLeve } from "../lib/dom";
|
||||||
import { BadRequestError, ServerError } from "../lib/erreurs";
|
import { BadRequestError, reporteErreur, ServerError } from "../lib/erreurs";
|
||||||
import { emetMessageMajBoutonPanier, emetMessageMajContenuPanier, emetUniqueMessageCanal } from "../lib/messages";
|
import {
|
||||||
|
emetMessageMajBoutonPanier,
|
||||||
|
emetMessageMajContenuPanier,
|
||||||
|
emetUniqueMessageBroadcastChannel,
|
||||||
|
} from "../lib/messages";
|
||||||
import { diviseParCent } from "../lib/nombres";
|
import { diviseParCent } from "../lib/nombres";
|
||||||
import { creeReponseSimplifiee, eitherAsyncFetch, postBackend } from "../lib/reseau";
|
import { creeReponseSimplifiee, eitherAsyncFetch, postBackend } from "../lib/reseau";
|
||||||
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
import { WCStoreCartSchema } from "../lib/schemas/api/cart";
|
||||||
|
|
@ -62,8 +68,14 @@ const recupereElementsEntreePanier = (entree: HTMLElement): ElementsEntreePanier
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Met à jour l'état d'activation des Boutons d'action sur chaque Entrée du Panier.
|
||||||
|
|
||||||
|
* @param activation Le nouvel état d'activation (activé/désactivé).
|
||||||
|
* @returns Rien.
|
||||||
|
*/
|
||||||
export const majActivationBoutons = (activation: boolean) => (entrees: ReadonlyArray<ElementsEntreePanier>): void =>
|
export const majActivationBoutons = (activation: boolean) => (entrees: ReadonlyArray<ElementsEntreePanier>): void =>
|
||||||
arrayForEach(entrees, entree => {
|
arrayForEach(entrees, (entree: ElementsEntreePanier): void => {
|
||||||
if (activation) {
|
if (activation) {
|
||||||
// Active les Boutons
|
// Active les Boutons
|
||||||
Number(entree.champQuantite.value) === 1
|
Number(entree.champQuantite.value) === 1
|
||||||
|
|
@ -82,6 +94,7 @@ export const majActivationBoutons = (activation: boolean) => (entrees: ReadonlyA
|
||||||
});
|
});
|
||||||
|
|
||||||
export const initialiseActionsEntreesPanier = (): void => {
|
export const initialiseActionsEntreesPanier = (): void => {
|
||||||
|
// Initialise des actions uniquement si des Entrées dans le Panier existent
|
||||||
E.ENTREES_PANIER.ifRight((entrees: Array<HTMLElement>) =>
|
E.ENTREES_PANIER.ifRight((entrees: Array<HTMLElement>) =>
|
||||||
arrayForEach(entrees, (entree: HTMLElement): void => {
|
arrayForEach(entrees, (entree: HTMLElement): void => {
|
||||||
/** Retire l'entrée du DOM si la clé Panier n'existe pas et arrête précocement */
|
/** Retire l'entrée du DOM si la clé Panier n'existe pas et arrête précocement */
|
||||||
|
|
@ -92,175 +105,253 @@ export const initialiseActionsEntreesPanier = (): void => {
|
||||||
})
|
})
|
||||||
.orDefault("CLE_PANIER_INEXISTANTE");
|
.orDefault("CLE_PANIER_INEXISTANTE");
|
||||||
/** */
|
/** */
|
||||||
const E: ElementsEntreePanier = recupereElementsEntreePanier(entree);
|
const E_P: ElementsEntreePanier = recupereElementsEntreePanier(entree);
|
||||||
|
|
||||||
entree.addEventListener("click", (evenement: Event) => {
|
entree.addEventListener("click", (evenement: Event): void => {
|
||||||
// Délégation d'Événements
|
// Délégation d'Événements
|
||||||
match(evenement.target)
|
match(evenement.target)
|
||||||
.with(P.nullish, () => console.error(evenement.target))
|
.with(P.nullish, () => console.error(evenement.target))
|
||||||
// Bouton d'addition
|
// Bouton d'addition
|
||||||
.when((cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_ADDITION_QUANTITE), () => {
|
.when(
|
||||||
Maybe
|
(cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_ADDITION_QUANTITE),
|
||||||
// Nécessaire pour que l'on ait une valeur à incrémenter
|
(): void => {
|
||||||
.fromNullable(E.champQuantite.valueAsNumber)
|
Maybe
|
||||||
.ifJust((valeur: number) => {
|
// Nécessaire pour que l'on ait une valeur à incrémenter
|
||||||
// Réalise la requête et traite sa réponse
|
.fromNullable(E_P.champQuantite.valueAsNumber)
|
||||||
void EitherAsync
|
.ifJust((valeur: number) => {
|
||||||
// 1. Valide les Arguments de la Requête
|
// Réalise la requête et traite sa réponse
|
||||||
.liftEither(eitherParse({ key: clePanier, quantity: valeur + 1 }, WCStoreCartUpdateItemArgsSchema))
|
void EitherAsync
|
||||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
// 1. Valide les Arguments de la Requête
|
||||||
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
.liftEither(eitherParse({ key: clePanier, quantity: valeur + 1 }, WCStoreCartUpdateItemArgsSchema))
|
||||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
||||||
.chain((args: WCStoreCartUpdateItemArgs) =>
|
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
||||||
eitherAsyncFetch(postBackend({
|
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||||
corps: JSON.stringify(args),
|
.chain((args: WCStoreCartUpdateItemArgs) =>
|
||||||
nonce: ETATS_PAGE.nonce,
|
eitherAsyncFetch(postBackend({
|
||||||
route: ROUTE_API_MAJ_ARTICLE_PANIER,
|
corps: JSON.stringify(args),
|
||||||
}))
|
nonce: ETATS_PAGE.nonce,
|
||||||
)
|
route: ROUTE_API_MAJ_ARTICLE_PANIER,
|
||||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
}))
|
||||||
.chain((reponse: Response) =>
|
|
||||||
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
|
||||||
// Simplifie les données à matcher
|
|
||||||
match(await creeReponseSimplifiee(reponse))
|
|
||||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
|
||||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
|
||||||
.with({ status: 200 }, r => r.body)
|
|
||||||
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
|
||||||
)
|
)
|
||||||
)
|
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||||
// 5. Vérifie le Schéma de la Réponse
|
.chain((reponse: Response) =>
|
||||||
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
||||||
.ifRight((panier: WCStoreCart) => {
|
// Simplifie les données à matcher
|
||||||
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
match(await creeReponseSimplifiee(reponse))
|
||||||
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
||||||
// Émet un Message avec le nouveau contenu du Panier
|
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
||||||
emetMessageMajContenuPanier({
|
.with({ status: 200 }, r => r.body)
|
||||||
produits: panier.items,
|
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
||||||
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
)
|
||||||
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
)
|
||||||
totalPanier: diviseParCent(panier.totals.total_price),
|
// 5. Vérifie le Schéma de la Réponse
|
||||||
});
|
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
||||||
// Émet un Message pour réinitialiser la validation de la livraison
|
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
.ifRight((panier: WCStoreCart): void => {
|
||||||
|
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
||||||
// Réactive les Boutons
|
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
||||||
// pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
})
|
emetMessageMajContenuPanier({
|
||||||
// TODO: ifLeft ?
|
produits: panier.items,
|
||||||
.run();
|
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
||||||
});
|
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
||||||
})
|
totalPanier: diviseParCent(panier.totals.total_price),
|
||||||
|
});
|
||||||
|
// Émet un Message pour réinitialiser la validation de la livraison
|
||||||
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
|
})
|
||||||
|
// 7. Traite les Erreurs et affiche un message à l'Utilisateur
|
||||||
|
.ifLeft(
|
||||||
|
(erreur: BadRequestError | FetchErrors | ServerError | ValiError<AnySchema>): void => {
|
||||||
|
match(erreur)
|
||||||
|
.with(P.instanceOf(ValiError), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e.issues);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(ServerError), P.instanceOf(BadRequestError), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(DOMException), P.instanceOf(TypeError), P.instanceOf(Error), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_RESEAU;
|
||||||
|
})
|
||||||
|
.exhaustive();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.finally(() => {
|
||||||
|
// Réactive les Boutons
|
||||||
|
pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
||||||
|
})
|
||||||
|
.run();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
// Bouton de soustraction
|
// Bouton de soustraction
|
||||||
.when((cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE), () => {
|
.when(
|
||||||
Maybe
|
(cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE),
|
||||||
// Nécessaire pour que l'on ait une valeur à incrémenter
|
(): void => {
|
||||||
.fromNullable(E.champQuantite.valueAsNumber)
|
Maybe
|
||||||
.filter(valeur => valeur > 1)
|
// Nécessaire pour que l'on ait une valeur à incrémenter
|
||||||
.ifJust((valeur: number) => {
|
.fromNullable(E_P.champQuantite.valueAsNumber)
|
||||||
// Réalise la requête et traite sa réponse
|
.filter(valeur => valeur > 1)
|
||||||
void EitherAsync
|
.ifJust((valeur: number) => {
|
||||||
// 1. Valide les Arguments de la Requête
|
// Réalise la requête et traite sa réponse
|
||||||
.liftEither(eitherParse({ key: clePanier, quantity: valeur - 1 }, WCStoreCartUpdateItemArgsSchema))
|
void EitherAsync
|
||||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
// 1. Valide les Arguments de la Requête
|
||||||
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
.liftEither(eitherParse({ key: clePanier, quantity: valeur - 1 }, WCStoreCartUpdateItemArgsSchema))
|
||||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
||||||
.chain((args: WCStoreCartUpdateItemArgs) =>
|
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
||||||
eitherAsyncFetch(postBackend({
|
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||||
corps: JSON.stringify(args),
|
.chain((args: WCStoreCartUpdateItemArgs) =>
|
||||||
nonce: ETATS_PAGE.nonce,
|
eitherAsyncFetch(postBackend({
|
||||||
route: ROUTE_API_MAJ_ARTICLE_PANIER,
|
corps: JSON.stringify(args),
|
||||||
}))
|
nonce: ETATS_PAGE.nonce,
|
||||||
)
|
route: ROUTE_API_MAJ_ARTICLE_PANIER,
|
||||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
}))
|
||||||
.chain((reponse: Response) =>
|
|
||||||
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
|
||||||
// Simplifie les données à matcher
|
|
||||||
match(await creeReponseSimplifiee(reponse))
|
|
||||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
|
||||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
|
||||||
.with({ status: 200 }, r => r.body)
|
|
||||||
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
|
||||||
)
|
)
|
||||||
)
|
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||||
// 5. Vérifie le Schéma de la Réponse
|
.chain((reponse: Response) =>
|
||||||
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
||||||
.ifRight((panier: WCStoreCart) => {
|
// Simplifie les données à matcher
|
||||||
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
match(await creeReponseSimplifiee(reponse))
|
||||||
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
||||||
// Émet un Message avec le nouveau contenu du Panier
|
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
||||||
emetMessageMajContenuPanier({
|
.with({ status: 200 }, r => r.body)
|
||||||
produits: panier.items,
|
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
||||||
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
)
|
||||||
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
)
|
||||||
totalPanier: diviseParCent(panier.totals.total_price),
|
// 5. Vérifie le Schéma de la Réponse
|
||||||
});
|
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
||||||
// Émet un Message pour réinitialiser la validation de la livraison
|
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
.ifRight((panier: WCStoreCart): void => {
|
||||||
|
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
||||||
// Réactive les Boutons
|
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
||||||
// pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
})
|
emetMessageMajContenuPanier({
|
||||||
// TODO: ifLeft ?
|
produits: panier.items,
|
||||||
.run();
|
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
||||||
});
|
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
||||||
})
|
totalPanier: diviseParCent(panier.totals.total_price),
|
||||||
|
});
|
||||||
|
// Émet un Message pour réinitialiser la validation de la livraison
|
||||||
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
|
})
|
||||||
|
// 7. Traite les Erreurs et affiche un message à l'Utilisateur
|
||||||
|
.ifLeft(
|
||||||
|
(erreur: BadRequestError | FetchErrors | ServerError | ValiError<AnySchema>): void => {
|
||||||
|
match(erreur)
|
||||||
|
.with(P.instanceOf(ValiError), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e.issues);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(ServerError), P.instanceOf(BadRequestError), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(DOMException), P.instanceOf(TypeError), P.instanceOf(Error), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_RESEAU;
|
||||||
|
})
|
||||||
|
.exhaustive();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.finally(() => {
|
||||||
|
// Réactive les Boutons
|
||||||
|
pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
||||||
|
})
|
||||||
|
.run();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
// Bouton de suppression
|
// Bouton de suppression
|
||||||
.when((cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_SUPPRESSION_PANIER), () => {
|
.when(
|
||||||
Maybe
|
(cible: EventTarget) => (cible as HTMLElement).matches(SELECTEUR_BOUTON_SUPPRESSION_PANIER),
|
||||||
// TODO: Pourquoi ?
|
(): void => {
|
||||||
.fromNullable(E.champQuantite.valueAsNumber)
|
Maybe
|
||||||
.ifJust(() => {
|
// TODO: Pourquoi ?
|
||||||
// Réalise la requête et traite sa réponse
|
.fromNullable(E_P.champQuantite.valueAsNumber)
|
||||||
void EitherAsync
|
.ifJust(() => {
|
||||||
// 1. Valide les Arguments de la Requête
|
// Réalise la requête et traite sa réponse
|
||||||
.liftEither(eitherParse({ key: clePanier }, WCStoreCartRemoveItemArgsSchema))
|
void EitherAsync
|
||||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
// 1. Valide les Arguments de la Requête
|
||||||
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
.liftEither(eitherParse({ key: clePanier }, WCStoreCartRemoveItemArgsSchema))
|
||||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
// 2. Exécute un Effet pour empêcher les requêtes concurrentes
|
||||||
.chain((args: WCStoreCartRemoveItemArgs) =>
|
.ifRight(() => pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(false)))
|
||||||
eitherAsyncFetch(postBackend({
|
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||||
corps: JSON.stringify(args),
|
.chain((args: WCStoreCartRemoveItemArgs) =>
|
||||||
nonce: ETATS_PAGE.nonce,
|
eitherAsyncFetch(postBackend({
|
||||||
route: ROUTE_API_RETIRE_ARTICLE_PANIER,
|
corps: JSON.stringify(args),
|
||||||
}))
|
nonce: ETATS_PAGE.nonce,
|
||||||
)
|
route: ROUTE_API_RETIRE_ARTICLE_PANIER,
|
||||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
}))
|
||||||
.chain((reponse: Response) =>
|
|
||||||
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
|
||||||
// Simplifie les données à matcher
|
|
||||||
match(await creeReponseSimplifiee(reponse))
|
|
||||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
|
||||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
|
||||||
.with({ status: 200 }, r => r.body)
|
|
||||||
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
|
||||||
)
|
)
|
||||||
)
|
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||||
// 5. Vérifie le Schéma de la Réponse
|
.chain((reponse: Response) =>
|
||||||
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
EitherAsync<BadRequestError | Error | ServerError, unknown>(async ({ throwE }) =>
|
||||||
.ifRight((panier: WCStoreCart) => {
|
// Simplifie les données à matcher
|
||||||
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
match(await creeReponseSimplifiee(reponse))
|
||||||
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
||||||
// Émet un Message avec le nouveau contenu du Panier
|
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
||||||
emetMessageMajContenuPanier({
|
.with({ status: 200 }, r => r.body)
|
||||||
produits: panier.items,
|
.otherwise(erreur => throwE(new Error(`Erreur inconnue ${String(erreur.status)}`)))
|
||||||
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
)
|
||||||
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
)
|
||||||
totalPanier: diviseParCent(panier.totals.total_price),
|
// 5. Vérifie le Schéma de la Réponse
|
||||||
});
|
.chain((corps: unknown) => EitherAsync.liftEither(eitherParse(corps, WCStoreCartSchema)))
|
||||||
// Émet un Message pour réinitialiser la validation de la livraison
|
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||||
emetUniqueMessageCanal(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
.ifRight((panier: WCStoreCart): void => {
|
||||||
|
// Émet un Message avec le nouveau nombre de Produits dans le Panier
|
||||||
|
emetMessageMajBoutonPanier({ quantiteProduits: panier.items_count });
|
||||||
|
// Émet un Message avec le nouveau contenu du Panier
|
||||||
|
emetMessageMajContenuPanier({
|
||||||
|
produits: panier.items,
|
||||||
|
sousTotalProduits: diviseParCent(panier.totals.total_items),
|
||||||
|
sousTotalReduction: diviseParCent(panier.totals.total_discount),
|
||||||
|
totalPanier: diviseParCent(panier.totals.total_price),
|
||||||
|
});
|
||||||
|
// Émet un Message pour réinitialiser la validation de la livraison
|
||||||
|
emetUniqueMessageBroadcastChannel(NOM_CANAL_REVALIDATION_LIVRAISON, true);
|
||||||
|
|
||||||
// Retire l'entrée du Panier du DOM
|
// Retire l'entrée du Panier du DOM
|
||||||
entree.remove();
|
entree.remove();
|
||||||
|
})
|
||||||
// Réactive les Boutons
|
// 7. Traite les Erreurs et affiche un message à l'Utilisateur
|
||||||
// pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
.ifLeft(
|
||||||
})
|
(erreur: BadRequestError | FetchErrors | ServerError | ValiError<AnySchema>): void => {
|
||||||
// TODO: ifLeft ?
|
match(erreur)
|
||||||
.run();
|
.with(P.instanceOf(ValiError), e => {
|
||||||
});
|
reporteErreur(e);
|
||||||
})
|
console.error(e.issues);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(ServerError), P.instanceOf(BadRequestError), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||||
|
})
|
||||||
|
.with(P.instanceOf(DOMException), P.instanceOf(TypeError), P.instanceOf(Error), e => {
|
||||||
|
reporteErreur(e);
|
||||||
|
console.error(e);
|
||||||
|
// E.MESSAGE_ADRESSES.textContent = ERREUR_GENERIQUE_RESEAU;
|
||||||
|
})
|
||||||
|
.exhaustive();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.finally(() => {
|
||||||
|
// Réactive les Boutons
|
||||||
|
pipe(entrees, arrayMap(recupereElementsEntreePanier), majActivationBoutons(true));
|
||||||
|
})
|
||||||
|
.run();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)
|
||||||
.run();
|
.run();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ import { valideMessageMajBoutonPanier, valideMessageMajContenuPanier } from "./l
|
||||||
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "./lib/nombres.ts";
|
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "./lib/nombres.ts";
|
||||||
import { propEither, recupereElementsDocumentEither, recupereEleOuLeve } from "./lib/utils.ts";
|
import { propEither, recupereElementsDocumentEither, recupereEleOuLeve } from "./lib/utils.ts";
|
||||||
import {
|
import {
|
||||||
|
demandeRevalidationLivraisonAMajFormulaires,
|
||||||
initialiseBoutonCalculLivraison,
|
initialiseBoutonCalculLivraison,
|
||||||
initialiseBoutonCreationCommande,
|
initialiseBoutonCreationCommande,
|
||||||
mepCanalRevalidationLivraison,
|
initialiseCanalRevalidationLivraison,
|
||||||
revalideLorsMajFormulaires,
|
|
||||||
} from "./page-panier/scripts-page-panier-adresses.ts";
|
} from "./page-panier/scripts-page-panier-adresses.ts";
|
||||||
import { initialiseElementsCodePromo } from "./page-panier/scripts-page-panier-code-promo.ts";
|
import { initialiseElementsCodePromo } from "./page-panier/scripts-page-panier-code-promo.ts";
|
||||||
import { initialiseActionsEntreesPanier } from "./page-panier/scripts-page-panier-panneau-produits.ts";
|
import { initialiseActionsEntreesPanier } from "./page-panier/scripts-page-panier-panneau-produits.ts";
|
||||||
|
|
@ -193,7 +193,7 @@ const initialiseMajFormulairesPanier = (): void => {
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", (): void => {
|
document.addEventListener("DOMContentLoaded", (): void => {
|
||||||
mepCanalRevalidationLivraison();
|
initialiseCanalRevalidationLivraison();
|
||||||
initialiseActionsEntreesPanier();
|
initialiseActionsEntreesPanier();
|
||||||
initialiseMajConteneurPanier();
|
initialiseMajConteneurPanier();
|
||||||
initialiseMajContenuPanier();
|
initialiseMajContenuPanier();
|
||||||
|
|
@ -201,5 +201,5 @@ document.addEventListener("DOMContentLoaded", (): void => {
|
||||||
initialiseBoutonCalculLivraison();
|
initialiseBoutonCalculLivraison();
|
||||||
initialiseBoutonCreationCommande();
|
initialiseBoutonCreationCommande();
|
||||||
initialiseElementsCodePromo();
|
initialiseElementsCodePromo();
|
||||||
revalideLorsMajFormulaires();
|
demandeRevalidationLivraisonAMajFormulaires();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ const ETATS_PAGE: EtatsPage = _etats;
|
||||||
*/
|
*/
|
||||||
const deplieToutesSections = (ensembleLiensContenus: Array<EnsembleLienContenu>): void =>
|
const deplieToutesSections = (ensembleLiensContenus: Array<EnsembleLienContenu>): void =>
|
||||||
arrayForEach(ensembleLiensContenus, (ensemble: EnsembleLienContenu): void => {
|
arrayForEach(ensembleLiensContenus, (ensemble: EnsembleLienContenu): void => {
|
||||||
ensemble.at(0)?.setAttribute(ATTRIBUT_ARIA_HIDDEN, "false");
|
Maybe.fromNullable(ensemble.at(0)).ifJust((e): void => e.setAttribute(ATTRIBUT_ARIA_HIDDEN, "false"));
|
||||||
ensemble.at(1)?.setAttribute(ATTRIBUT_HIDDEN, "true");
|
Maybe.fromNullable(ensemble.at(1)).ifJust((e): void => e.setAttribute(ATTRIBUT_HIDDEN, "true"));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Éléments d'intérêt
|
// Éléments d'intérêt
|
||||||
|
|
@ -87,26 +87,26 @@ const initialiseFlechesDefilementImages = (): void => {
|
||||||
const recupereIndexImageCourante = (): number => Number(E.PHOTOS_PRODUIT.getAttribute(ATTRIBUT_INDEX_IMAGE_ACTIVE));
|
const recupereIndexImageCourante = (): number => Number(E.PHOTOS_PRODUIT.getAttribute(ATTRIBUT_INDEX_IMAGE_ACTIVE));
|
||||||
|
|
||||||
// Affiche et cache en fonction de la position de défilement
|
// Affiche et cache en fonction de la position de défilement
|
||||||
A.forEachWithIndex([E.IMAGES.at(0), E.IMAGES.at(-1)], (index, image) => {
|
A.forEachWithIndex([E.IMAGES.at(0), E.IMAGES.at(-1)], (index, image): void => {
|
||||||
if (!image) return;
|
if (!image) return;
|
||||||
|
|
||||||
// Change les attributs gérants l'affichage des flèches de défilement
|
// Change les attributs gérants l'affichage des flèches de défilement
|
||||||
new IntersectionObserver(
|
new IntersectionObserver(
|
||||||
A.forEach(entree =>
|
A.forEach((entree): void =>
|
||||||
match([entree.isIntersecting, index])
|
match([entree.isIntersecting, index])
|
||||||
.with([true, 0], () => E.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-debut"))
|
.with([true, 0], (): void => E.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-debut"))
|
||||||
.with([true, 1], () => E.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-fin"))
|
.with([true, 1], (): void => E.CONTENEUR_FLECHES_DEFILEMENT.removeAttribute("data-images-presentes-fin"))
|
||||||
.with([false, 0], () => E.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-debut", ""))
|
.with([false, 0], (): void => E.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-debut", ""))
|
||||||
.with([false, 1], () => E.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-fin", ""))
|
.with([false, 1], (): void => E.CONTENEUR_FLECHES_DEFILEMENT.setAttribute("data-images-presentes-fin", ""))
|
||||||
.otherwise(() => void 0)
|
.otherwise((): void => void 0)
|
||||||
),
|
),
|
||||||
{ root: null, rootMargin: "100% 0% 100% 0%", threshold: 0.5 },
|
{ root: null, rootMargin: "100% 0% 100% 0%", threshold: 0.5 },
|
||||||
).observe(image);
|
).observe(image);
|
||||||
|
|
||||||
// Change l'index de l'Image active en fonction du défilement
|
// Change l'index de l'Image active en fonction du défilement
|
||||||
A.forEachWithIndex(E.IMAGES, (index, image) =>
|
A.forEachWithIndex(E.IMAGES, (index, image): void =>
|
||||||
new IntersectionObserver(
|
new IntersectionObserver(
|
||||||
A.forEach(entree => {
|
A.forEach((entree): void => {
|
||||||
if (!entree.isIntersecting) return;
|
if (!entree.isIntersecting) return;
|
||||||
E.PHOTOS_PRODUIT.setAttribute(ATTRIBUT_INDEX_IMAGE_ACTIVE, String(index));
|
E.PHOTOS_PRODUIT.setAttribute(ATTRIBUT_INDEX_IMAGE_ACTIVE, String(index));
|
||||||
}),
|
}),
|
||||||
|
|
@ -116,7 +116,7 @@ const initialiseFlechesDefilementImages = (): void => {
|
||||||
// Défile au clic sur les flèches
|
// Défile au clic sur les flèches
|
||||||
E.FLECHE_DEFILEMENT_GAUCHE.addEventListener(
|
E.FLECHE_DEFILEMENT_GAUCHE.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
() =>
|
(): void =>
|
||||||
E.IMAGES[recupereIndexImageCourante() - 1]?.scrollIntoView({
|
E.IMAGES[recupereIndexImageCourante() - 1]?.scrollIntoView({
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
block: "nearest",
|
block: "nearest",
|
||||||
|
|
@ -125,7 +125,7 @@ const initialiseFlechesDefilementImages = (): void => {
|
||||||
);
|
);
|
||||||
E.FLECHE_DEFILEMENT_DROITE.addEventListener(
|
E.FLECHE_DEFILEMENT_DROITE.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
() =>
|
(): void =>
|
||||||
E.IMAGES[recupereIndexImageCourante() + 1]?.scrollIntoView({
|
E.IMAGES[recupereIndexImageCourante() + 1]?.scrollIntoView({
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
block: "nearest",
|
block: "nearest",
|
||||||
|
|
@ -166,7 +166,7 @@ const gereBoiteInformationsProduit = (): void => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ajoute des Écouteurs d'Événements
|
// Ajoute des Écouteurs d'Événements
|
||||||
E.SELECTEUR_VARIATION.ifRight(selecteur =>
|
E.SELECTEUR_VARIATION.ifRight((selecteur): void =>
|
||||||
selecteur.addEventListener("change", (evenement: Event): void => {
|
selecteur.addEventListener("change", (evenement: Event): void => {
|
||||||
const cibleSelecteur: Maybe<HTMLSelectElement> = Maybe
|
const cibleSelecteur: Maybe<HTMLSelectElement> = Maybe
|
||||||
.fromNullable(evenement.target)
|
.fromNullable(evenement.target)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ interface ImportMeta {
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
/** URL du endpoint pour le report d'Erreurs au service GlitchTip. */
|
/** URL du endpoint pour le report d'Erreurs au service GlitchTip. */
|
||||||
readonly VITE_GLITCHTIP_NSD: string;
|
readonly VITE_GLITCHTIP_NSD: string;
|
||||||
|
/** Mode (development/production) du contexte. */
|
||||||
|
readonly VITE_MODE: string;
|
||||||
/** URL du site. */
|
/** URL du site. */
|
||||||
readonly VITE_URL: string;
|
readonly VITE_URL: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@
|
||||||
|
|
||||||
<footer class="panneau__pied-de-page">
|
<footer class="panneau__pied-de-page">
|
||||||
<button form="formulaire-commande" type="submit">
|
<button form="formulaire-commande" type="submit">
|
||||||
Submit the addresses
|
Calculate shipping
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue