first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 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,58 @@
.wishlist-stats .card-text {
width: 100%;
padding: 10px 30px;
}
.wishlist-stats .wishlist-stats-topbar {
display: flex;
justify-content: space-between;
align-items: center;
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;
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;
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 @@
{"version":3,"sources":["_stats.scss","backoffice.css"],"names":[],"mappings":"AAEI;EACE,WAAA;EACA,kBAAA;ACDN;ADKE;EACE,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,eAAA;EACA,mBAAA;ACHJ;ADKI;EACE,yBAAA;EACA,kBAAA;ACHN;ADKM;EACE,cAAA;EACA,eAAA;EACA,iBAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;EACA,0BAAA;ACHR;ADKQ;EACE,+BAAA;ACHV;ADMQ;EAEE,yBAAA;EACA,WAAA;ACLV;ADUI;EACE,cAAA;EACA,eAAA;EACA,iBAAA;EACA,iBAAA;EACA,iBAAA;EACA,yBAAA;EACA,kBAAA;EACA,0BAAA;EACA,gBAAA;ACRN;ADUM;EACE,mBAAA;EACA,YAAA;ACRR;ADaE;EACE,aAAA;ACXJ;ADaI;EACE,cAAA;ACXN;ADeM;EACE,eAAA;ACbR;ADiBI;EACE,iBAAA;ACfN","file":"backoffice.css"}

View File

@@ -0,0 +1 @@
@import '_stats';