From 39844a88299b6e4380b79890314e17d6d1c3ea9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Tue, 24 Oct 2023 00:59:09 +0200 Subject: [PATCH] utils files structure changes --- .../checkout/handler/delivery/changeDeliveryMethodHandler.js | 2 +- _dev/js/theme/components/useStickyElement.js | 2 +- _dev/js/theme/core/cart/handler/cart/addToCartHandler.js | 2 +- .../theme/core/product/handler/product/updateProductHandler.js | 2 +- .../js/theme/core/product/persister/productFormDataPersister.js | 2 +- _dev/js/utils/{ => form}/formSerialize.js | 0 _dev/js/utils/http/useHttpController.js | 2 +- _dev/js/utils/{ => misc}/debounce.js | 0 _dev/js/utils/{ => misc}/getUniqueId.js | 0 _dev/js/utils/{ => misc}/sprintf.js | 0 10 files changed, 6 insertions(+), 6 deletions(-) rename _dev/js/utils/{ => form}/formSerialize.js (100%) rename _dev/js/utils/{ => misc}/debounce.js (100%) rename _dev/js/utils/{ => misc}/getUniqueId.js (100%) rename _dev/js/utils/{ => misc}/sprintf.js (100%) diff --git a/_dev/js/checkout/core/checkout/handler/delivery/changeDeliveryMethodHandler.js b/_dev/js/checkout/core/checkout/handler/delivery/changeDeliveryMethodHandler.js index 8a4d7991..0819d0f1 100644 --- a/_dev/js/checkout/core/checkout/handler/delivery/changeDeliveryMethodHandler.js +++ b/_dev/js/checkout/core/checkout/handler/delivery/changeDeliveryMethodHandler.js @@ -1,5 +1,5 @@ import prestashop from 'prestashop'; -import { formSerializeArray, fromSerializeObject } from '../../../../../utils/formSerialize'; +import { formSerializeArray, fromSerializeObject } from '../../../../../utils/form/formSerialize'; import selectDeliveryMethodRequest from '../../request/selectDeliveryMethodRequest'; import refreshCheckoutPage from '../../utils/refreshCheckoutPage'; import { each, parseToHtml } from '../../../../../utils/DOM/DOMHelpers'; diff --git a/_dev/js/theme/components/useStickyElement.js b/_dev/js/theme/components/useStickyElement.js index 3cc41b4d..4d910cbb 100644 --- a/_dev/js/theme/components/useStickyElement.js +++ b/_dev/js/theme/components/useStickyElement.js @@ -1,4 +1,4 @@ -import debounce from '../../utils/debounce'; +import debounce from '../../utils/misc/debounce'; /** * Returns sticky element data diff --git a/_dev/js/theme/core/cart/handler/cart/addToCartHandler.js b/_dev/js/theme/core/cart/handler/cart/addToCartHandler.js index 0ccfcba6..c26ccf99 100644 --- a/_dev/js/theme/core/cart/handler/cart/addToCartHandler.js +++ b/_dev/js/theme/core/cart/handler/cart/addToCartHandler.js @@ -1,7 +1,7 @@ import prestashop from 'prestashop'; import useAlertToast from '../../../../components/useAlertToast'; import addToCartRequest from '../../request/cart/addToCartRequest'; -import sprintf from '../../../../../utils/sprintf'; +import sprintf from '../../../../../utils/misc/sprintf'; const { danger } = useAlertToast(); diff --git a/_dev/js/theme/core/product/handler/product/updateProductHandler.js b/_dev/js/theme/core/product/handler/product/updateProductHandler.js index 6c743c71..5043f321 100644 --- a/_dev/js/theme/core/product/handler/product/updateProductHandler.js +++ b/_dev/js/theme/core/product/handler/product/updateProductHandler.js @@ -7,7 +7,7 @@ import productStateStore from '../../store/productStateStore'; import updateQuantityInputHandler from './updateQuantityInputHandler'; import updateProductCustomizationHandler from './updateProductCustomizationHandler'; import updateProductDOMElementsHandler from './updateProductDOMElementsHandler'; -import { fromSerializeObject } from '../../../../../utils/formSerialize'; +import { fromSerializeObject } from '../../../../../utils/form/formSerialize'; import productEventContextSelector from '../../utils/productEventContextSelector'; const { getCurrentRequestDelayedId, setCurrentRequestDelayedId } = productStateStore(); diff --git a/_dev/js/theme/core/product/persister/productFormDataPersister.js b/_dev/js/theme/core/product/persister/productFormDataPersister.js index 33bcde83..39f45781 100644 --- a/_dev/js/theme/core/product/persister/productFormDataPersister.js +++ b/_dev/js/theme/core/product/persister/productFormDataPersister.js @@ -1,4 +1,4 @@ -import { formSerializeArray } from '../../../../utils/formSerialize'; +import { formSerializeArray } from '../../../../utils/form/formSerialize'; let formData = []; diff --git a/_dev/js/utils/formSerialize.js b/_dev/js/utils/form/formSerialize.js similarity index 100% rename from _dev/js/utils/formSerialize.js rename to _dev/js/utils/form/formSerialize.js diff --git a/_dev/js/utils/http/useHttpController.js b/_dev/js/utils/http/useHttpController.js index 222663f0..ff151cf7 100644 --- a/_dev/js/utils/http/useHttpController.js +++ b/_dev/js/utils/http/useHttpController.js @@ -1,4 +1,4 @@ -import getUniqueId from '../getUniqueId'; +import getUniqueId from '../misc/getUniqueId'; /** * @module useHttpController diff --git a/_dev/js/utils/debounce.js b/_dev/js/utils/misc/debounce.js similarity index 100% rename from _dev/js/utils/debounce.js rename to _dev/js/utils/misc/debounce.js diff --git a/_dev/js/utils/getUniqueId.js b/_dev/js/utils/misc/getUniqueId.js similarity index 100% rename from _dev/js/utils/getUniqueId.js rename to _dev/js/utils/misc/getUniqueId.js diff --git a/_dev/js/utils/sprintf.js b/_dev/js/utils/misc/sprintf.js similarity index 100% rename from _dev/js/utils/sprintf.js rename to _dev/js/utils/misc/sprintf.js