2024-12-03
This commit is contained in:
parent
8613e0698c
commit
e27f6eaf31
11 changed files with 1727 additions and 2060 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/export": "error",
|
"import/export": "error",
|
||||||
"no-array-for-each": "off",
|
"no-array-for-each": "off",
|
||||||
|
"no-async-await": "off",
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"no-magic-numbers": "warn",
|
"no-magic-numbers": "warn",
|
||||||
"no-rest-spread-properties": "off",
|
"no-rest-spread-properties": "off",
|
||||||
|
|
@ -35,6 +36,8 @@
|
||||||
"typescript/consistent-type-imports": "error",
|
"typescript/consistent-type-imports": "error",
|
||||||
"prefer-await-to-then": "off",
|
"prefer-await-to-then": "off",
|
||||||
"no-void": "off",
|
"no-void": "off",
|
||||||
"no-optional-chaining": "off"
|
"no-optional-chaining": "off",
|
||||||
|
"no-unused-expressions": "off",
|
||||||
|
"no-misused-promises": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
TODO.md
1
TODO.md
|
|
@ -11,6 +11,7 @@
|
||||||
- Champs
|
- Champs
|
||||||
- Reporter toutes les erreurs
|
- Reporter toutes les erreurs
|
||||||
- Utiliser un polyfill pour BroadcastChannel
|
- Utiliser un polyfill pour BroadcastChannel
|
||||||
|
- PAGE SHOP Faire apparaître le menu des catégories de Produits quand on scroll vers le haut
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"log1x/wp-smtp": "^1.0.2",
|
"log1x/wp-smtp": "^1.0.2",
|
||||||
"lstrojny/functional-php": "^1.17",
|
"lstrojny/functional-php": "^1.17",
|
||||||
"mnsami/composer-custom-directory-installer": "^2.0",
|
"mnsami/composer-custom-directory-installer": "^2.0",
|
||||||
"oscarotero/env": "^2.1",
|
"oscarotero/env": "^2.1.1",
|
||||||
"ramsey/uuid": "^4.7.6",
|
"ramsey/uuid": "^4.7.6",
|
||||||
"roots/bedrock-autoloader": "^1.0.4",
|
"roots/bedrock-autoloader": "^1.0.4",
|
||||||
"roots/bedrock-disallow-indexing": "^2.0",
|
"roots/bedrock-disallow-indexing": "^2.0",
|
||||||
|
|
@ -34,14 +34,14 @@
|
||||||
"roots/wp-config": "^1.0",
|
"roots/wp-config": "^1.0",
|
||||||
"roots/wp-password-bcrypt": "^1.2",
|
"roots/wp-password-bcrypt": "^1.2",
|
||||||
"stripe/stripe-php": "^16.3",
|
"stripe/stripe-php": "^16.3",
|
||||||
"symfony/uid": "^7.1.6",
|
"symfony/uid": "^7.2.0",
|
||||||
"timber/timber": "^2.3",
|
"timber/timber": "^2.3",
|
||||||
"vlucas/phpdotenv": "^5.6.1",
|
"vlucas/phpdotenv": "^5.6.1",
|
||||||
"wpackagist-plugin/falcon": "^2.8.4",
|
"wpackagist-plugin/falcon": "^2.8.4",
|
||||||
"wpackagist-plugin/force-regenerate-thumbnails": "^2.2.1",
|
"wpackagist-plugin/force-regenerate-thumbnails": "^2.2.1",
|
||||||
"wpackagist-plugin/query-monitor": "^3.17.0",
|
"wpackagist-plugin/query-monitor": "^3.17.0",
|
||||||
"wpackagist-plugin/redis-cache": "^2.5.4",
|
"wpackagist-plugin/redis-cache": "^2.5.4",
|
||||||
"wpackagist-plugin/wc-multishipping": "^2.5.3",
|
"wpackagist-plugin/wc-multishipping": "^2.5.4",
|
||||||
"wpackagist-plugin/woocommerce": "^9.4.2",
|
"wpackagist-plugin/woocommerce": "^9.4.2",
|
||||||
"wpackagist-plugin/wp-mail-logging": "^1.13.1",
|
"wpackagist-plugin/wp-mail-logging": "^1.13.1",
|
||||||
"wpackagist-plugin/wp-mail-smtp": "^4.2",
|
"wpackagist-plugin/wp-mail-smtp": "^4.2",
|
||||||
|
|
@ -50,11 +50,10 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/extension-installer": "^1.4.3",
|
"phpstan/extension-installer": "^1.4.3",
|
||||||
"phpstan/phpstan": "^2.0.2",
|
"phpstan/phpstan": "^2.0.3",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"squizlabs/php_codesniffer": "^3.11.1",
|
"squizlabs/php_codesniffer": "^3.11.1",
|
||||||
"szepeviktor/phpstan-wordpress": "2.x-dev",
|
"szepeviktor/phpstan-wordpress": "2.x-dev"
|
||||||
"vimeo/psalm": "^5.26.1"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
|
|
|
||||||
1859
composer.lock
generated
1859
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -36,6 +36,8 @@ export default tseslint.config(
|
||||||
ignoreArrowShorthand: true,
|
ignoreArrowShorthand: true,
|
||||||
ignoreVoidOperator: false,
|
ignoreVoidOperator: false,
|
||||||
}],
|
}],
|
||||||
|
/* Chiant avec certaines Promises. */
|
||||||
|
"@typescript-eslint/no-misused-promises": "off",
|
||||||
/* Cette règle empêche l'usage de génériques précisant les types de retour de fonctions. */
|
/* Cette règle empêche l'usage de génériques précisant les types de retour de fonctions. */
|
||||||
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
||||||
"@typescript-eslint/no-unused-expressions": ["error", {
|
"@typescript-eslint/no-unused-expressions": ["error", {
|
||||||
|
|
|
||||||
29
package.json
29
package.json
|
|
@ -8,10 +8,13 @@
|
||||||
"packageManager": "pnpm@9.14.4",
|
"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"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mobily/ts-belt": "4.0.0-rc.5",
|
"@mobily/ts-belt": "4.0.0-rc.5",
|
||||||
"@sentry/browser": "8.41.0",
|
"@sentry/browser": "8.42.0",
|
||||||
"@swan-io/boxed": "^3.1.2",
|
"@swan-io/boxed": "^3.1.2",
|
||||||
"a11y-dialog": "^8.1.1",
|
"a11y-dialog": "^8.1.1",
|
||||||
"optics-ts": "^2.4.1",
|
"optics-ts": "^2.4.1",
|
||||||
|
|
@ -24,10 +27,11 @@
|
||||||
"@eslint/js": "^9.16.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.42.0",
|
||||||
"@swc/cli": "0.5.2",
|
"@swc/cli": "0.5.2",
|
||||||
"@types/eslint__js": "^8.42.3",
|
"@types/eslint__js": "^8.42.3",
|
||||||
"@types/node": "^22.10.1",
|
"@types/node": "^22.10.1",
|
||||||
|
"@vitejs/plugin-legacy": "^6.0.0",
|
||||||
"better-typescript-lib": "^2.10.0",
|
"better-typescript-lib": "^2.10.0",
|
||||||
"browserslist": "^4.24.2",
|
"browserslist": "^4.24.2",
|
||||||
"eslint": "^9.16.0",
|
"eslint": "^9.16.0",
|
||||||
|
|
@ -35,13 +39,13 @@
|
||||||
"eslint-plugin-perfectionist": "^4.1.2",
|
"eslint-plugin-perfectionist": "^4.1.2",
|
||||||
"fdir": "^6.4.2",
|
"fdir": "^6.4.2",
|
||||||
"globals": "^15.13.0",
|
"globals": "^15.13.0",
|
||||||
"knip": "^5.38.3",
|
"knip": "^5.39.1",
|
||||||
"oxlint": "^0.14.0",
|
"oxlint": "^0.14.0",
|
||||||
"picomatch": "^4.0.2",
|
"picomatch": "^4.0.2",
|
||||||
"prettier": "^3.4.1",
|
"prettier": "^3.4.1",
|
||||||
"prettier-plugin-pkg": "^0.18.1",
|
"prettier-plugin-pkg": "^0.18.1",
|
||||||
"prettier-plugin-sh": "^0.14.0",
|
"prettier-plugin-sh": "^0.14.0",
|
||||||
"sass-embedded": "^1.81.0",
|
"sass-embedded": "^1.81.1",
|
||||||
"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",
|
||||||
|
|
@ -49,7 +53,7 @@
|
||||||
"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",
|
||||||
"typescript-eslint": "^8.16.0",
|
"typescript-eslint": "^8.17.0",
|
||||||
"vite": "^6.0.2",
|
"vite": "^6.0.2",
|
||||||
"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",
|
||||||
|
|
@ -67,8 +71,15 @@
|
||||||
"ios >0 and last 3 years"
|
"ios >0 and last 3 years"
|
||||||
],
|
],
|
||||||
"knip": {
|
"knip": {
|
||||||
"entry": ["web/app/themes/haiku-atelier-2024/src/scripts/*.ts"],
|
"entry": [
|
||||||
"project": ["web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"]
|
"web/app/themes/haiku-atelier-2024/src/scripts/*.ts"
|
||||||
|
],
|
||||||
|
"project": [
|
||||||
|
"web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"trustedDependencies": ["@biomejs/biome", "@parcel/watcher"]
|
"trustedDependencies": [
|
||||||
|
"@biomejs/biome",
|
||||||
|
"@parcel/watcher"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1862
pnpm-lock.yaml
generated
1862
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -13,7 +13,7 @@
|
||||||
"exactOptionalPropertyTypes": true,
|
"exactOptionalPropertyTypes": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"lib": ["DOM", "DOM.Iterable", "ES2020", "ES2022"],
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
"module": "ES2020",
|
"module": "ES2020",
|
||||||
"moduleDetection": "force",
|
"moduleDetection": "force",
|
||||||
"moduleResolution": "Bundler",
|
"moduleResolution": "Bundler",
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
"strictPropertyInitialization": true,
|
"strictPropertyInitialization": true,
|
||||||
"suppressExcessPropertyErrors": false,
|
"suppressExcessPropertyErrors": false,
|
||||||
"suppressImplicitAnyIndexErrors": false,
|
"suppressImplicitAnyIndexErrors": false,
|
||||||
"target": "ES2020",
|
"target": "ESNext",
|
||||||
"types": ["vite/client"],
|
"types": ["vite/client"],
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"useUnknownInCatchVariables": true
|
"useUnknownInCatchVariables": true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import legacy from "@vitejs/plugin-legacy";
|
||||||
import { fdir } from "fdir";
|
import { fdir } from "fdir";
|
||||||
import { resolve } from "node:path";
|
import { resolve } from "node:path";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
|
|
@ -59,6 +60,12 @@ export default defineConfig(async ({ mode }) => {
|
||||||
include: [],
|
include: [],
|
||||||
protocolImports: true,
|
protocolImports: true,
|
||||||
}),
|
}),
|
||||||
|
legacy({
|
||||||
|
modernPolyfills: true,
|
||||||
|
modernTargets:
|
||||||
|
"chrome >0 and last 3 years, edge >0 and last 3 years, safari >0 and last 3 years, firefox >0 and last 3 years, and_chr >0 and last 3 years, and_ff >0 and last 3 years, ios >0 and last 3 years",
|
||||||
|
renderLegacyChunks: false,
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,10 @@ $total_panier = Number::format(floatval(WC()->cart->get_totals()["total"]), prec
|
||||||
|
|
||||||
foreach (WC()->cart->get_cart() as $cle_panier => $article_panier) {
|
foreach (WC()->cart->get_cart() as $cle_panier => $article_panier) {
|
||||||
$panier[$cle_panier] = [
|
$panier[$cle_panier] = [
|
||||||
// "attributs" => recupere_et_formate_attributs_produit($article_panier["data"]?->get_attributes()),
|
"attributs" =>
|
||||||
|
$article_panier["data"]?->get_type() == "variation"
|
||||||
|
? recupere_et_formate_attributs_produit($article_panier["data"]?->get_attributes())
|
||||||
|
: [],
|
||||||
"cle" => $cle_panier,
|
"cle" => $cle_panier,
|
||||||
"id_produit" => $article_panier["product_id"],
|
"id_produit" => $article_panier["product_id"],
|
||||||
"id_variation" => $article_panier["variation_id"],
|
"id_variation" => $article_panier["variation_id"],
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ export const initialiseBoutonCalculLivraison = (): void => {
|
||||||
.when(
|
.when(
|
||||||
// TODO: Créer une fonction utilitaire
|
// TODO: Créer une fonction utilitaire
|
||||||
p => pipe(dictValues(p), arrayFind(c => c === "The provided postcode is not valid")),
|
p => pipe(dictValues(p), arrayFind(c => c === "The provided postcode is not valid")),
|
||||||
// TODO: Créer une fonction utililtaire pour fixer le texte d'un message
|
// TODO: Créer une fonction utilitaire pour fixer le texte d'un message
|
||||||
(): void => {
|
(): void => {
|
||||||
E.MESSAGE_ADRESSES.textContent = ERREUR_ADRESSE_MAUVAIS_CODE_POSTAL;
|
E.MESSAGE_ADRESSES.textContent = ERREUR_ADRESSE_MAUVAIS_CODE_POSTAL;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue