first commit

This commit is contained in:
2024-10-28 22:14:22 +01:00
commit b65352c452
40581 changed files with 5712079 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
/**
* 2007-2020 PrestaShop and Contributors
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2020 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
import blockwishlistModule from 'blockwishlistModule';
const tabButtons = document.querySelectorAll('.btn-group button');
const refreshButton = document.querySelector('.js-refresh');
let isLoading = false;
tabButtons.forEach((button) => {
button.addEventListener('click', () => {
if (!button.classList.contains('active')) {
tabButtons.forEach((elem) => {
elem.classList.remove('active');
});
button.classList.add('active');
const tabs = document.querySelectorAll('.wishlist-tab');
tabs.forEach((tab) => {
if (
tab.classList.contains('active')
&& tab.dataset.tab !== button.dataset.tab
) {
tab.classList.remove('active');
}
if (tab.dataset.tab === button.dataset.tab) {
tab.classList.add('active');
}
});
}
});
});
refreshButton.addEventListener('click', async () => {
if (!isLoading) {
isLoading = true;
const cacheButton = refreshButton.innerHTML;
refreshButton.innerHTML = '<i class="material-icons">hourglass_empty</i>';
const response = await fetch(`${blockwishlistModule.resetCacheUrl}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json, text/javascript, */*; q=0.01',
},
});
const {success} = await response.json();
if (success) {
location.reload();
} else {
isLoading = false;
refreshButton.innerHTML = cacheButton;
}
}
});

View File

@@ -0,0 +1,22 @@
/**
* 2007-2020 PrestaShop and Contributors
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2020 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
import TranslatableInput from '@PSJs/components/translatable-input';
new TranslatableInput();

View File

@@ -0,0 +1,76 @@
.wishlist-stats {
.card {
&-text {
width: 100%;
padding: 10px 30px;
}
}
& &-topbar {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
margin-bottom: 20px;
.btn-group {
border: 1px solid #b7ced3;
border-radius: 3px;
button {
color: #363a41;
font-size: 14px;
letter-spacing: 0;
line-height: 19px;
background: none;
font-weight: 500;
transition: 0.25s ease-out;
&:not(:last-child) {
border-right: 1px solid #b7ced3;
}
&:hover,
&.active {
background-color: #25b9d7;
color: #fff;
}
}
}
.refresh {
color: #6c868e;
font-size: 14px;
font-weight: bold;
letter-spacing: 0;
line-height: 19px;
border: 1px solid #6c868e;
border-radius: 4px;
transition: 0.25s ease-out;
background: none;
&:hover {
background: #6c868e;
color: white;
}
}
}
.wishlist-tab {
display: none;
&.active {
display: block;
}
.column-image {
img {
max-width: 50px;
}
}
.column-conversionRate {
font-weight: bold;
}
}
}

View File

@@ -0,0 +1,2 @@
.wishlist-stats .card-text{width:100%;padding:10px 30px}.wishlist-stats .wishlist-stats-topbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:20px}.wishlist-stats .wishlist-stats-topbar .btn-group{border:1px solid #b7ced3;border-radius:3px}.wishlist-stats .wishlist-stats-topbar .btn-group button{color:#363a41;font-size:14px;letter-spacing:0;line-height:19px;background:none;font-weight:500;-webkit-transition:0.25s ease-out;transition:0.25s ease-out}.wishlist-stats .wishlist-stats-topbar .btn-group button:not(:last-child){border-right:1px solid #b7ced3}.wishlist-stats .wishlist-stats-topbar .btn-group button:hover,.wishlist-stats .wishlist-stats-topbar .btn-group button.active{background-color:#25b9d7;color:#fff}.wishlist-stats .wishlist-stats-topbar .refresh{color:#6c868e;font-size:14px;font-weight:bold;letter-spacing:0;line-height:19px;border:1px solid #6c868e;border-radius:4px;-webkit-transition:0.25s ease-out;transition:0.25s ease-out;background:none}.wishlist-stats .wishlist-stats-topbar .refresh:hover{background:#6c868e;color:white}.wishlist-stats .wishlist-tab{display:none}.wishlist-stats .wishlist-tab.active{display:block}.wishlist-stats .wishlist-tab .column-image img{max-width:50px}.wishlist-stats .wishlist-tab .column-conversionRate{font-weight:bold}
/*# sourceMappingURL=backoffice.css.map */

View File

@@ -0,0 +1,10 @@
{
"version": 3,
"mappings": "ACAA,AAEI,eAFW,CAEV,UAAK,AAAC,CACL,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,SAAS,CACnB,AALL,AAQE,eARa,CAQV,sBAAO,AAAC,CACT,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,aAAa,CAC9B,WAAW,CAAE,MAAM,CACnB,SAAS,CAAE,IAAI,CACf,aAAa,CAAE,IAAI,CA2CpB,AAxDH,AAeI,eAfW,CAQV,sBAAO,CAOR,UAAU,AAAC,CACT,MAAM,CAAE,iBAAiB,CACzB,aAAa,CAAE,GAAG,CAqBnB,AAtCL,AAmBM,eAnBS,CAQV,sBAAO,CAOR,UAAU,CAIR,MAAM,AAAC,CACL,KAAK,CAAE,OAAO,CACd,SAAS,CAAE,IAAI,CACf,cAAc,CAAE,CAAC,CACjB,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,cAAc,CAW3B,AArCP,AA4BQ,eA5BO,C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