fixed all eslint errors and warning, compiled as PROD

This commit is contained in:
2021-03-31 18:42:05 +02:00
parent ae3c8f1234
commit 3042f97b29
46 changed files with 388 additions and 42514 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
/*!
* vue-i18n v8.22.2
* (c) 2020 kazuya kawaguchi
* Released under the MIT License.
*/
/*!
* vue-infinite-loading v2.4.5
* (c) 2016-2020 PeachScript
* MIT License
*/
/*!
* vuex v3.6.0
* (c) 2020 Evan You
* @license MIT
*/

View File

@@ -1,73 +1,2 @@
body {
font-size: 16px;
font-family: "Ubuntu",Arial,"MS Trebuchet",sans-serif;
font-weight: 500;
font-style: normal;
line-height: 1.3; }
body {
margin: 0;
padding: 0; }
#printable-root-page {
box-sizing: border-box;
width: 21cm;
padding: 1cm .5cm 2cm; }
#printable-root-page > header {
display: flex;
flex-flow: nowrap;
align-items: baseline; }
#printable-root-page > header h1 {
margin: 0;
font-weight: 600; }
#printable-root-page > article {
padding-top: 1em; }
#printable-root-page > article > h2 {
font-weight: 600;
margin: 0; }
#printable-root-page > article .field--name-field-reference {
margin: 0 0 1em 0; }
#printable-root-page > article .field--name-body,
#printable-root-page > article .field--name-field-samples {
display: inline-block;
vertical-align: top; }
#printable-root-page > article .field--name-body {
width: 75%; }
#printable-root-page > article .field--name-body p {
margin: 0; }
#printable-root-page > article .field__label {
font-size: 0.756em;
font-weight: 700; }
#printable-root-page > article .field--name-field-samples {
width: 23%;
text-align: right; }
#printable-root-page > article .field--name-field-samples .field__item {
font-size: 0.756em; }
#printable-root-page > article .field--name-field-manufacturer,
#printable-root-page > article .field--name-field-distributor {
margin-top: 1em;
display: inline-block;
vertical-align: top;
width: 49%; }
#printable-root-page > article .field--name-field-manufacturer .taxonomy-term,
#printable-root-page > article .field--name-field-distributor .taxonomy-term {
padding-bottom: 0.5em; }
#printable-root-page > article .field--name-field-manufacturer .taxonomy-term > h2,
#printable-root-page > article .field--name-field-distributor .taxonomy-term > h2 {
margin: 0;
font-weight: 600;
font-size: 1em; }
#printable-root-page > article .field--name-field-manufacturer .taxonomy-term p,
#printable-root-page > article .field--name-field-distributor .taxonomy-term p {
margin: 0; }
#printable-root-page > article .field--name-field-materiau-images {
margin-top: 1em;
display: flex;
flex-flow: row wrap;
justify-content: space-between; }
#printable-root-page > article .field--name-field-materiau-images .field__item {
flex: 0 0 33%; }
#printable-root-page > article .field--name-field-materiau-images .field__item img {
width: 100%;
height: auto; }
body{font-size:16px;font-family:"Ubuntu",Arial,"MS Trebuchet",sans-serif;font-weight:500;font-style:normal;line-height:1.3}body{margin:0;padding:0}#printable-root-page{box-sizing:border-box;width:21cm;padding:1cm .5cm 2cm}#printable-root-page>header{display:flex;flex-flow:nowrap;align-items:baseline}#printable-root-page>header h1{margin:0;font-weight:600}#printable-root-page>article{padding-top:1em}#printable-root-page>article>h2{font-weight:600;margin:0}#printable-root-page>article .field--name-field-reference{margin:0 0 1em 0}#printable-root-page>article .field--name-body,#printable-root-page>article .field--name-field-samples{display:inline-block;vertical-align:top}#printable-root-page>article .field--name-body{width:75%}#printable-root-page>article .field--name-body p{margin:0}#printable-root-page>article .field__label{font-size:0.756em;font-weight:700}#printable-root-page>article .field--name-field-samples{width:23%;text-align:right}#printable-root-page>article .field--name-field-samples .field__item{font-size:0.756em}#printable-root-page>article .field--name-field-manufacturer,#printable-root-page>article .field--name-field-distributor{margin-top:1em;display:inline-block;vertical-align:top;width:49%}#printable-root-page>article .field--name-field-manufacturer .taxonomy-term,#printable-root-page>article .field--name-field-distributor .taxonomy-term{padding-bottom:0.5em}#printable-root-page>article .field--name-field-manufacturer .taxonomy-term>h2,#printable-root-page>article .field--name-field-distributor .taxonomy-term>h2{margin:0;font-weight:600;font-size:1em}#printable-root-page>article .field--name-field-manufacturer .taxonomy-term p,#printable-root-page>article .field--name-field-distributor .taxonomy-term p{margin:0}#printable-root-page>article .field--name-field-materiau-images{margin-top:1em;display:flex;flex-flow:row wrap;justify-content:space-between}#printable-root-page>article .field--name-field-materiau-images .field__item{flex:0 0 33%}#printable-root-page>article .field--name-field-materiau-images .field__item img{width:100%;height:auto}

View File

@@ -1,69 +0,0 @@
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is not neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./web/themes/custom/materiotheme/assets/styles/print.scss":
/*!*****************************************************************!*\
!*** ./web/themes/custom/materiotheme/assets/styles/print.scss ***!
\*****************************************************************/
/*! namespace exports */
/*! exports [not provided] [no usage info] */
/*! runtime requirements: __webpack_require__.r, __webpack_exports__, __webpack_require__.* */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/assets/styles/print.scss?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/ // startup
/******/ // Load entry module
/******/ __webpack_require__("./web/themes/custom/materiotheme/assets/styles/print.scss");
/******/ // This entry module used 'exports' so it can't be inlined
/******/ })()
;

View File

@@ -80,9 +80,9 @@ import { MA } from 'vuejs/api/ma-axios'
function checkNoVuePages () {
// return drupalDecoupled.sys_path != '/cart'
// && drupalDecoupled.sys_path.indexOf('checkout') != 1;
if (drupalDecoupled.route_name.indexOf('commerce') == -1 &&
drupalDecoupled.route_name.indexOf('flagging_collection') == -1 &&
drupalDecoupled.route_name.indexOf('user') == -1) {
if (drupalDecoupled.route_name.indexOf('commerce') === -1 &&
drupalDecoupled.route_name.indexOf('flagging_collection') === -1 &&
drupalDecoupled.route_name.indexOf('user') === -1) {
return false
} else {
return true
@@ -122,7 +122,7 @@ import { MA } from 'vuejs/api/ma-axios'
function initVRouter () {
// we need this to update the title and body classes while using history nav
router.beforeEach((to, from, next) => {
// console.log('router beforeEach to ', to);
console.log('router beforeEach to ', to)
// commit new title to store
let title = null
switch (to.name) {
@@ -142,7 +142,7 @@ import { MA } from 'vuejs/api/ma-axios'
// remove all path related body classes
const body_classes = document.querySelector('body').classList
const classes_to_rm = []
for (var i = 0; i < body_classes.length; i++) {
for (let i = 0; i < body_classes.length; i++) {
if (body_classes[i].startsWith('path-')) {
classes_to_rm.push(body_classes[i])
}
@@ -150,26 +150,26 @@ import { MA } from 'vuejs/api/ma-axios'
document.querySelector('body').classList.remove(...classes_to_rm)
// add new path classes to body
const classes = []
if (to.name == 'home') {
if (to.name === 'home') {
classes.push('path-home')
} else {
const path_parts = to.path
.replace(/^\//, '')
// remove language relative prefix from path classes (fr, en, etc)
.replace(/^\D{2,3}\//, '')
.split('/')
for (var i = 0; i < path_parts.length; i++) {
if (i == 0) {
var c = 'path-' + path_parts[i]
} else if (path_parts[i] !== '') {
var c = classes[i - 1] + '-' + path_parts[i]
.replace(/^\D{2,3}\//, '') // remove language relative prefix from path classes (fr, en, etc)
.split('/')
let c
for (let j = 0; j < path_parts.length; j++) {
if (j === 0) {
c = 'path-' + path_parts[j]
} else if (path_parts[j] !== '') {
c = classes[j - 1] + '-' + path_parts[j]
}
classes.push(c)
}
}
document.querySelector('body').classList.add(...classes)
updateLanguageLinksBlock(to.path);
updateLanguageLinksBlock(to.path)
// close the hamburger menu
store.dispatch('Common/openCloseHamMenu', false)
@@ -179,32 +179,32 @@ import { MA } from 'vuejs/api/ma-axios'
})
}
function updateLanguageLinksBlock(path){
function updateLanguageLinksBlock (path) {
// update block language selection
console.log("updateLanguageLinksBlock, path:", path);
let links = document.querySelectorAll('#block-languageswitcher a.language-link')
console.log('router beforeEach path ', path)
const links = document.querySelectorAll('#block-languageswitcher a.language-link')
let params = {
const params = {
path: path
// XDEBUG_SESSION_START: true
}
MA.post(`materio_decoupled/path_translation_links?`, params)
MA.post('materio_decoupled/path_translation_links?', params)
.then(({ data }) => {
console.log('Path translations links', data)
if (data.error) {
console.warn("error getting translation paths", data.error);
console.warn('error getting translation paths', data.error)
}
links.forEach((link, i) => {
console.log("language link",path , link)
let hreflang = link.getAttribute('hreflang')
console.log('language link', path, link)
const hreflang = link.getAttribute('hreflang')
link.setAttribute('href', data.links[hreflang].url)
link.setAttribute('data-drupal-link-system-path', data.links[hreflang].sys_path)
link.innerHTML = data.links[hreflang].title
});
})
})
.catch(error => {
console.warn('Path translations links', error)
@@ -219,9 +219,9 @@ import { MA } from 'vuejs/api/ma-axios'
el: '#block-sitebranding',
methods: {
onclick (event) {
// console.log("Clicked on logo event", event);
// console.log('router beforeEach to ', to)
const href = event.target.getAttribute('href')
// console.log("Clicked on logo href", href);
// console.log('router beforeEach to ', to)
this.$router.push(href)
// replaced by router.beforeEach
// this.$store.commit('Common/setPagetitle', null)
@@ -290,14 +290,14 @@ import { MA } from 'vuejs/api/ma-axios'
},
render: h => h(VUserBlock, { props: props })
}).$mount('#' + mount_point)
// console.log('initVUserBlock', _v_user_block);
// console.log('router beforeEach to ', to)
}
function initVHeaderMenu () {
// console.log('initVHeaderMenu');
// console.log('router beforeEach to ', to)
const id = 'block-header'
const $html_obj = document.querySelector('#' + id)
// console.log('main-content', $main_content);
// console.log('router beforeEach to ', to)
const html = $html_obj.outerHTML
_v_header_menu = new Vue({
store,
@@ -307,10 +307,10 @@ import { MA } from 'vuejs/api/ma-axios'
}).$mount('#' + id)
}
function initHamburgerMenu(){
function initHamburgerMenu () {
const input = document.querySelector('input#header-block-right-toggle')
input.addEventListener('change', (e) => {
console.log("block header right toggle", e, this);
console.log('initHamburgerMenu input change ', e)
store.dispatch('Common/openCloseHamMenu', e.currentTarget.checked)
})
}
@@ -318,7 +318,7 @@ import { MA } from 'vuejs/api/ma-axios'
function initVMainContent () {
const id = 'main-content'
const $main_content = document.querySelector('#' + id)
// console.log('main-content', $main_content);
// console.log('router beforeEach to ', to)
const main_html = $main_content.innerHTML
_v_main_content = new Vue({
store,
@@ -334,7 +334,7 @@ import { MA } from 'vuejs/api/ma-axios'
}
function initVSearchBlock () {
// console.log('initVSearchBlock');
// console.log('router beforeEach to ', to)
const id = 'block-materiosapisearchblock'
let $search_block = document.getElementById(id)
let formhtml = null
@@ -360,7 +360,7 @@ import { MA } from 'vuejs/api/ma-axios'
}
function initVLeftContent () {
const id = 'content-left'
const $leftContent = document.getElementById(id)
// const $leftContent = document.getElementById(id)
// in any case create the vue
_v_left_content = new Vue({
store,
@@ -371,5 +371,6 @@ import { MA } from 'vuejs/api/ma-axios'
init()
} // end MaterioTheme()
const materiotheme = new MaterioTheme()
// const materiotheme = new MaterioTheme()
MaterioTheme()
})(Drupal, drupalSettings, drupalDecoupled)