Lazy loading other assets #607

This commit is contained in:
mateuswetah 2021-10-04 16:57:48 -03:00
parent 7b11899082
commit 370cc7f974
27 changed files with 1424 additions and 373 deletions

View File

@ -19,7 +19,7 @@ if [ $current_OS == "Darwin" ]; then
find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-package-build.md5
else
find src *.js -type f \( -name "*.js" -or -name "*.vue" -or -name "webpack.common.js" -or -name "webpack.dev.js" -or -name "webpack.prod.js" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-js-build.md5
find ./src/views/admin/scss/ ./src/views/roles/ ./src/views/media-component/ ./src/views/reports/ ./src/views/gutenberg-blocks ./src/views/gutenberg-blocks/tainacan-blocks/collections-list ./src/views/gutenberg-blocks/tainacan-blocks/facets-list ./src/views/gutenberg-blocks/tainacan-blocks/dynamic-items-list ./src/views/gutenberg-blocks/tainacan-blocks/items-list ./src/views/gutenberg-blocks/tainacan-blocks/terms-list -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5
find ./src/views/admin/scss/ ./src/views/gutenberg-blocks ./src/views/gutenberg-blocks/tainacan-blocks/collections-list ./src/views/gutenberg-blocks/tainacan-blocks/facets-list ./src/views/gutenberg-blocks/tainacan-blocks/dynamic-items-list ./src/views/gutenberg-blocks/tainacan-blocks/items-list ./src/views/gutenberg-blocks/tainacan-blocks/terms-list -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5
find ./composer.json -type f \( -name "composer.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-composer-build.md5
find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5
fi

View File

@ -14,7 +14,7 @@ sass -E 'UTF-8' --cache-location .tmp/sass-cache-2 src/views/roles/tainacan-role
sass -E 'UTF-8' --cache-location .tmp/sass-cache-3 src/views/reports/tainacan-reports.scss:src/assets/css/tainacan-reports.css
sass -E 'UTF-8' --cache-location .tmp/sass-cache-4 src/views/media-component/media-component.scss:src/assets/css/media-component.css
sass -E 'UTF-8' --cache-location .tmp/sass-cache-4 src/views/gutenberg-blocks/tainacan-blocks/item-gallery/style.scss:src/assets/css/tainacan-gutenberg-block-item-gallery.css
sass -E 'UTF-8' --cache-location .tmp/sass-cache-5 src/views/gutenberg-blocks/tainacan-blocks/collections-list/style.scss:src/assets/css/tainacan-gutenberg-block-collections-list.css

View File

@ -472,9 +472,6 @@
.block-editor-block-list__block > .wp-block-tainacan-carousel-collections-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block > .wp-block-tainacan-carousel-collections-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-collections-list .swiper-container a > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-collections-list .swiper-container a:hover > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-collections-list li.collection-list-item a > span,

View File

@ -444,9 +444,6 @@
.block-editor-block-list__block > .wp-block-tainacan-carousel-items-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block > .wp-block-tainacan-carousel-items-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-items-list .swiper-container a > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-items-list .swiper-container a:hover > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-items-list li.item-list-item a > span,

View File

@ -471,9 +471,6 @@
.block-editor-block-list__block > .wp-block-tainacan-carousel-terms-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block > .wp-block-tainacan-carousel-terms-list {
max-width: calc(100% - 72px); }
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-terms-list .swiper-container a > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-terms-list .swiper-container a:hover > span,
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-terms-list li.term-list-item a > span,

View File

@ -0,0 +1,956 @@
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
*/
/* pswp = photoswipe */
.pswp {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
z-index: 9999999;
-webkit-text-size-adjust: 100%;
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
-webkit-backface-visibility: hidden;
outline: none; }
.pswp * {
box-sizing: border-box; }
.pswp img {
max-width: none; }
/* style is added when JS option showHideOpacity is set to true */
.pswp--animate_opacity {
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
opacity: 0.001;
will-change: opacity;
/* for open/close transition */
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--open {
display: block; }
.pswp--zoom-allowed .pswp__img {
/* autoprefixer: off */
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.pswp--zoomed-in .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab; }
.pswp--dragging .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing; }
/*
Background is added as a separate element.
As animating opacity is much faster than animating rgba() background-color.
*/
.pswp__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
opacity: 0;
transform: translateZ(0);
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__scroll-wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden; }
.pswp__container,
.pswp__zoom-wrap {
-ms-touch-action: none;
touch-action: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0; }
/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-touch-callout: none; }
.pswp__zoom-wrap {
position: absolute;
width: 100%;
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
/* for open/close transition */
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp__bg {
will-change: opacity;
/* for open/close transition */
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--animated-in .pswp__bg,
.pswp--animated-in .pswp__zoom-wrap {
-webkit-transition: none;
transition: none; }
.pswp__container,
.pswp__zoom-wrap {
-webkit-backface-visibility: hidden; }
.pswp__item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden; }
.pswp__img {
position: absolute;
width: auto;
height: auto;
top: 0;
left: 0; }
/*
stretched thumbnail or div placeholder element (see below)
style is added to avoid flickering in webkit/blink when layers overlap
*/
.pswp__img--placeholder {
-webkit-backface-visibility: hidden; }
/*
div element that matches size of large image
large image loads on top of it
*/
.pswp__img--placeholder--blank {
background: #222; }
.pswp--ie .pswp__img {
width: 100% !important;
height: auto !important;
left: 0;
top: 0; }
/*
Error message appears when image is not loaded
(JS option errorMsg controls markup)
*/
.pswp__error-msg {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
font-size: 14px;
line-height: 16px;
margin-top: -8px;
color: #CCC; }
.pswp__error-msg a {
color: #CCC;
text-decoration: underline; }
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Contents:
1. Buttons
2. Share modal and links
3. Index indicator ("1 of X" counter)
4. Caption
5. Loading indicator
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
*/
/*
1. Buttons
*/
/* <button> css reset */
.pswp__button {
width: 44px;
height: 44px;
position: relative;
background: none;
cursor: pointer;
overflow: visible;
-webkit-appearance: none;
display: block;
border: 0;
padding: 0;
margin: 0;
float: right;
opacity: 0.75;
transition: opacity 0.2s;
box-shadow: none; }
.pswp__button:focus, .pswp__button:hover {
opacity: 1; }
.pswp__button:active {
outline: none;
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
.pswp__ui--over-close .pswp__button--close {
opacity: 1; }
.pswp__button,
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
background: url(../images/default-skin.png) 0 0 no-repeat;
background-size: 264px 88px;
width: 44px;
height: 44px; }
@media (-webkit-min-device-pixel-ratio: 1.1), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
.pswp--svg .pswp__button,
.pswp--svg .pswp__button--arrow--left:before,
.pswp--svg .pswp__button--arrow--right:before {
background-image: url(../images/default-skin.svg); }
.pswp--svg .pswp__button--arrow--left,
.pswp--svg .pswp__button--arrow--right {
background: none; } }
.pswp__button--close {
background-position: 0 -44px; }
.pswp__button--share {
background-position: -44px -44px; }
.pswp__button--fs {
display: none; }
.pswp--supports-fs .pswp__button--fs {
display: block; }
.pswp--fs .pswp__button--fs {
background-position: -44px 0; }
.pswp__button--zoom {
display: none;
background-position: -88px 0; }
.pswp--zoom-allowed .pswp__button--zoom {
display: block; }
.pswp--zoomed-in .pswp__button--zoom {
background-position: -132px 0; }
/* no arrows on touch screens */
.pswp--touch .pswp__button--arrow--left,
.pswp--touch .pswp__button--arrow--right {
visibility: hidden; }
/*
Arrow buttons hit area
(icon is added to :before pseudo-element)
*/
.pswp__button--arrow--left,
.pswp__button--arrow--right {
background: none;
top: 50%;
margin-top: -50px;
width: 70px;
height: 100px;
position: absolute; }
.pswp__button--arrow--left {
left: 0; }
.pswp__button--arrow--right {
right: 0; }
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
content: '';
top: 35px;
background-color: rgba(0, 0, 0, 0.3);
height: 30px;
width: 32px;
position: absolute; }
.pswp__button--arrow--left:before {
left: 6px;
background-position: -138px -44px; }
.pswp__button--arrow--right:before {
right: 6px;
background-position: -94px -44px; }
/*
2. Share modal/popup and links
*/
.pswp__counter,
.pswp__share-modal {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.pswp__share-modal {
display: block;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 10px;
position: absolute;
z-index: 10000099;
opacity: 0;
transition: opacity 0.25s ease-out;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__share-modal--hidden {
display: none; }
.pswp__share-tooltip {
z-index: 10000119;
position: absolute;
background: #FFF;
top: 56px;
border-radius: 2px;
display: block;
width: auto;
right: 44px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
transform: translateY(6px);
transition: transform 0.25s;
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__share-tooltip a {
display: block;
padding: 8px 12px;
color: #000;
text-decoration: none;
font-size: 14px;
line-height: 18px; }
.pswp__share-tooltip a:hover {
text-decoration: none;
color: #000; }
.pswp__share-tooltip a:first-child {
/* round corners on the first/last list item */
border-radius: 2px 2px 0 0; }
.pswp__share-tooltip a:last-child {
border-radius: 0 0 2px 2px; }
.pswp__share-modal--fade-in {
opacity: 1; }
.pswp__share-modal--fade-in .pswp__share-tooltip {
transform: translateY(0); }
/* increase size of share links on touch devices */
.pswp--touch .pswp__share-tooltip a {
padding: 16px 12px; }
a.pswp__share--facebook:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
top: -12px;
right: 15px;
border: 6px solid rgba(0, 0, 0, 0);
border-bottom-color: #FFF;
-webkit-pointer-events: none;
-moz-pointer-events: none;
pointer-events: none; }
a.pswp__share--facebook:hover {
background: #3E5C9A;
color: #FFF; }
a.pswp__share--facebook:hover:before {
border-bottom-color: #3E5C9A; }
a.pswp__share--twitter:hover {
background: #55ACEE;
color: #FFF; }
a.pswp__share--pinterest:hover {
background: #CCC;
color: #CE272D; }
a.pswp__share--download:hover {
background: #DDD; }
/*
3. Index indicator ("1 of X" counter)
*/
.pswp__counter {
position: absolute;
left: 0;
top: 0;
height: 44px;
font-size: 13px;
line-height: 44px;
color: #FFF;
opacity: 0.75;
padding: 0 10px; }
/*
4. Caption
*/
.pswp__caption {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: 44px; }
.pswp__caption small {
font-size: 11px;
color: #BBB; }
.pswp__caption__center {
text-align: left;
max-width: 420px;
margin: 0 auto;
font-size: 13px;
padding: 10px;
line-height: 20px;
color: #CCC; }
.pswp__caption--empty {
display: none; }
/* Fake caption element, used to calculate height of next/prev image */
.pswp__caption--fake {
visibility: hidden; }
/*
5. Loading indicator (preloader)
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
*/
.pswp__preloader {
width: 44px;
height: 44px;
position: absolute;
top: 0;
left: 50%;
margin-left: -22px;
opacity: 0;
transition: opacity 0.25s ease-out;
will-change: opacity;
direction: ltr; }
.pswp__preloader__icn {
width: 20px;
height: 20px;
margin: 12px; }
.pswp__preloader--active {
opacity: 1; }
.pswp__preloader--active .pswp__preloader__icn {
/* We use .gif in browsers that don't support CSS animation */
background: url(../images/preloader.gif) 0 0 no-repeat; }
.pswp--css_animation .pswp__preloader--active {
opacity: 1; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
animation: clockwise 500ms linear infinite; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
.pswp--css_animation .pswp__preloader__icn {
background: none;
opacity: 0.75;
width: 14px;
height: 14px;
position: absolute;
left: 15px;
top: 15px;
margin: 0; }
.pswp--css_animation .pswp__preloader__cut {
/*
The idea of animating inner circle is based on Polymer ("material") loading indicator
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
*/
position: relative;
width: 7px;
height: 14px;
overflow: hidden; }
.pswp--css_animation .pswp__preloader__donut {
box-sizing: border-box;
width: 14px;
height: 14px;
border: 2px solid #FFF;
border-radius: 50%;
border-left-color: transparent;
border-bottom-color: transparent;
position: absolute;
top: 0;
left: 0;
background: none;
margin: 0; }
@media screen and (max-width: 1024px) {
.pswp__preloader {
position: relative;
left: auto;
top: auto;
margin: 0;
float: right; } }
@keyframes clockwise {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
@keyframes donut-rotate {
0% {
transform: rotate(0); }
50% {
transform: rotate(-140deg); }
100% {
transform: rotate(0); } }
/*
6. Additional styles
*/
/* root element of UI */
.pswp__ui {
-webkit-font-smoothing: auto;
visibility: visible;
opacity: 1;
z-index: 10000049; }
/* top black bar with buttons and "1 of X" indicator */
.pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 44px;
width: 100%; }
.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
-webkit-backface-visibility: hidden;
will-change: opacity;
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
visibility: visible; }
.pswp__top-bar,
.pswp__caption {
background-color: rgba(0, 0, 0, 0.5); }
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
.pswp__ui--fit .pswp__top-bar,
.pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.3); }
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
.pswp__ui--idle .pswp__top-bar {
opacity: 0; }
.pswp__ui--idle .pswp__button--arrow--left,
.pswp__ui--idle .pswp__button--arrow--right {
opacity: 0; }
/*
pswp__ui--hidden class is added when controls are hidden
e.g. when user taps to toggle visibility of controls
*/
.pswp__ui--hidden .pswp__top-bar,
.pswp__ui--hidden .pswp__caption,
.pswp__ui--hidden .pswp__button--arrow--left,
.pswp__ui--hidden .pswp__button--arrow--right {
/* Force paint & create composition layer for controls. */
opacity: 0.001; }
/* pswp__ui--one-slide class is added when there is just one item in gallery */
.pswp__ui--one-slide .pswp__button--arrow--left,
.pswp__ui--one-slide .pswp__button--arrow--right,
.pswp__ui--one-slide .pswp__counter {
display: none; }
.pswp__element--disabled {
display: none !important; }
.pswp--minimal--dark .pswp__top-bar {
background: none; }
.tainacan-media-component {
--swiper-theme-color: var(--tainacan-secondary, #298596);
--swiper-navigation-size: 44px;
--tainacan-media-background: var(--tainacan-background-color, #ffffff);
--tainacan-media-main-carousel-height: 60vh;
--tainacan-media-main-carousel-width: 100%;
--tainacan-media-thumbs-carousel-width: 100%;
--tainacan-media-thumbs-carousel-item-size: 136px;
width: 100%;
height: auto;
display: block;
background-color: var(--tainacan-media-background, #ffffff); }
/* Style valid for both cases of carousel, main and thumbs */
.tainacan-media-component__swiper-main .swiper-button-prev::after,
.tainacan-media-component__swiper-main .swiper-container-rtl .swiper-button-next::after,
.tainacan-media-component__swiper-thumbs .swiper-button-prev::after,
.tainacan-media-component__swiper-thumbs .swiper-container-rtl .swiper-button-next::after {
content: 'previous'; }
.tainacan-media-component__swiper-main .swiper-button-next::after,
.tainacan-media-component__swiper-main .swiper-button-prev::after,
.tainacan-media-component__swiper-thumbs .swiper-button-next::after,
.tainacan-media-component__swiper-thumbs .swiper-button-prev::after {
font-family: "TainacanIcons";
opacity: 0.7;
transition: opacity ease 0.2s; }
.tainacan-media-component__swiper-main:hover .swiper-button-next::after,
.tainacan-media-component__swiper-main:hover .swiper-button-prev::after,
.tainacan-media-component__swiper-thumbs:hover .swiper-button-next::after,
.tainacan-media-component__swiper-thumbs:hover .swiper-button-prev::after {
opacity: 1; }
.tainacan-media-component__swiper-main ul.swiper-wrapper,
.tainacan-media-component__swiper-thumbs ul.swiper-wrapper {
list-style: none;
padding: 0; }
.tainacan-media-component__swiper-main {
width: 100%;
max-width: var(--tainacan-media-main-carousel-width, 100%); }
.tainacan-media-component__swiper-main ul.swiper-wrapper {
display: flex;
align-items: center;
margin: 0; }
.tainacan-media-component__swiper-main ul.swiper-wrapper[data-pswp-uid]:not([data-pswp-uid='']) li.swiper-slide img {
cursor: zoom-in !important; }
.tainacan-media-component__swiper-main li.swiper-slide {
height: 100%;
max-width: 100%;
padding: 0 var(--swiper-navigation-size, 44px);
opacity: 1.0;
transition: opacity 0.2s linear; }
.tainacan-media-component__swiper-main li.swiper-slide:not(.swiper-slide-active) {
opacity: 0.75; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata {
text-align: center;
font-size: 0.875em;
margin-bottom: 1em; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name .swiper-slide-metadata__name {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-description .swiper-slide-metadata__description {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-caption .swiper-slide-metadata__caption {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption br {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__name {
font-size: 1em;
font-weight: bold;
color: var(--tainacan-label-color, #454647); }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__caption {
font-size: 0.9375em;
color: var(--tainacan-input-color, #1d1d1d); }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__caption {
font-size: 0.875em;
color: var(--tainacan-info-color, #555758); }
.tainacan-media-component__swiper-main .swiper-slide-content {
width: 100%;
height: 100%;
display: block;
text-align: center; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed {
width: 100%;
height: auto; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-has-aspect-ratio {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 2) / 1);
/* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-21-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 21) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-18-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 18) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-16-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 16) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-4-3 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 4) / 3); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-1 {
max-width: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-3-4 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 3) / 4); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-9-16 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 9) / 16); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-2 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 1) / 2); }
.tainacan-media-component__swiper-main .swiper-slide-content iframe {
max-height: var(--tainacan-media-main-carousel-height, 60vh);
max-width: 100%;
margin-left: auto;
margin-right: auto;
border: none;
display: block;
background-image: url("../images/preloader.gif");
background-repeat: no-repeat;
background-position: center; }
.tainacan-media-component__swiper-main .swiper-slide-content a:first-of-type,
.tainacan-media-component__swiper-main .swiper-slide-content p:first-of-type {
z-index: 99;
background: var(--tainacan-media-background, #ffffff);
border-radius: 3px;
word-wrap: break-word;
padding: 1rem 2rem;
display: block; }
.tainacan-media-component__swiper-main .swiper-slide-content audio {
background: black;
min-height: 38px;
border-radius: 20px;
width: 100%;
height: auto;
max-height: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content video {
min-height: 56px;
width: 100%;
height: auto;
max-height: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content img {
width: auto;
max-height: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content .twitter-tweet {
margin-left: auto;
margin-right: auto; }
.tainacan-media-component__swiper-thumbs {
width: 100%;
max-width: var(--tainacan-media-thumbs-carousel-width, 100%); }
.tainacan-media-component__swiper-thumbs ul.swiper-wrapper {
max-width: calc(100% - var(--swiper-navigation-size, 44px) - var(--swiper-navigation-size, 44px));
margin: 0 var(--swiper-navigation-size, 44px); }
.tainacan-media-component__swiper-thumbs ul.swiper-wrapper[data-pswp-uid]:not([data-pswp-uid='']) li.swiper-slide {
cursor: zoom-in; }
.tainacan-media-component__swiper-thumbs li.swiper-slide {
text-align: center;
vertical-align: top;
word-break: break-all;
font-size: 0.875em;
max-width: calc(var(--tainacan-media-thumbs-carousel-item-size, 136px) + 17px); }
@media only screen and (max-width: 380px) {
.tainacan-media-component__swiper-thumbs li.swiper-slide {
margin: 10px 0; } }
.tainacan-media-component__swiper-thumbs li.swiper-slide img {
width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
height: var(--tainacan-media-thumbs-carousel-item-size, 136px);
max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
max-height: var(--tainacan-media-thumbs-carousel-item-size, 136px);
object-fit: cover;
object-position: center;
border-bottom-width: 6px;
border-bottom-style: solid;
background-color: var(--tainacan-media-background, #ffffff);
border-bottom-color: rgba(255, 255, 255, 0);
opacity: 0.85;
transition: opacity 0.3s ease, border-bottom-color 0.3s ease; }
.tainacan-media-component__swiper-thumbs li.swiper-slide img:focus, .tainacan-media-component__swiper-thumbs li.swiper-slide img:hover {
opacity: 0.95;
outline: none;
border-bottom-color: var(--swiper-theme-color, #298596); }
.tainacan-media-component__swiper-thumbs li.swiper-slide.swiper-slide-thumb-active .swiper-slide-metadata__name {
font-weight: bold; }
.tainacan-media-component__swiper-thumbs li.swiper-slide.swiper-slide-thumb-active img {
opacity: 1.0;
border-bottom-color: var(--swiper-theme-color, #298596); }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__name {
font-size: 1em;
color: var(--tainacan-label-color, #454647); }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__caption {
font-size: 0.9375em;
color: var(--tainacan-input-color, #1d1d1d); }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__caption {
font-size: 0.875em;
color: var(--tainacan-info-color, #555758); }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata {
text-align: center;
display: block;
margin-top: 0.5rem; }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-name .swiper-slide-metadata__name {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-description .swiper-slide-metadata__description {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-caption .swiper-slide-metadata__caption {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption br {
display: none;
visibility: hidden; }
.tainacan-media-component__swiper-thumbs li.swiper-slide a {
width: 100%;
max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
text-align: center;
word-break: break-word; }
.tainacan-media-component__swiper-thumbs li.swiper-slide a,
.tainacan-media-component__swiper-thumbs li.swiper-slide a:focus,
.tainacan-media-component__swiper-thumbs li.swiper-slide a:hover {
outline: none;
text-decoration: none;
color: var(--tainacan-gray5, #454647); }
.tainacan-media-component__swiper-thumbs .swiper-start-border {
position: absolute;
height: 100%;
width: calc(32px + var(--swiper-navigation-size, 44px));
background-image: linear-gradient(90deg, var(--tainacan-media-background, #ffffff) 25%, transparent);
top: 0;
left: 0;
z-index: 1; }
.tainacan-media-component__swiper-thumbs .swiper-end-border {
position: absolute;
height: 100%;
width: calc(32px + var(--swiper-navigation-size, 44px));
background-image: linear-gradient(90deg, transparent, var(--tainacan-media-background, #ffffff) 75%);
top: 0;
right: 0;
z-index: 1; }
.tainacan-media-component__swiper-main + .tainacan-media-component__swiper-thumbs ul.swiper-wrapper {
margin-bottom: 1rem; }
.tainacan-media-component__swiper-main + .tainacan-media-component__swiper-thumbs li.swiper-slide {
cursor: pointer; }
.tainacan-photoswipe-layer .pswp__bg {
background-color: rgba(0, 0, 0, 0.85); }
.tainacan-photoswipe-layer .pswp__ui--fit .pswp__top-bar,
.tainacan-photoswipe-layer .pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.7); }
.tainacan-photoswipe-layer .pswp__button--arrow--left::before,
.tainacan-photoswipe-layer .pswp__button--arrow--right::before {
background-color: rgba(0, 0, 0, 0.5); }
.tainacan-photoswipe-layer .pswp__container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center; }
.tainacan-photoswipe-layer .pswp__container .attachment-without-image {
width: 100%;
height: calc(100% - 44px);
display: flex;
justify-content: center;
align-items: center;
text-align: center;
padding: 44px;
margin-top: 22px; }
.tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) {
width: 90vw;
height: 90vh;
border: none;
margin: 44px;
display: block;
background-image: url("../images/preloader.gif");
background-repeat: no-repeat;
background-position: center; }
.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap > iframe#iframePDF {
width: 90vw;
height: 90vh;
border: none;
margin: 44px auto;
display: block;
background-image: url("../images/preloader.gif");
background-repeat: no-repeat;
background-position: center; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed {
width: 100%;
height: auto; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-has-aspect-ratio {
max-width: calc((90vh * 2) / 1);
/* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-21-9 {
max-width: calc((90vh * 21) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-18-9 {
max-width: calc((90vh * 18) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-16-9 {
max-width: calc((90vh * 16) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-4-3 {
max-width: calc((90vh * 4) / 3); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-1 {
max-width: 90vh; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-9-16 {
max-width: calc((90vh * 9) / 16); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
max-width: calc((90vh * 1) / 2); }
.tainacan-photoswipe-layer .pswp__container a:first-of-type,
.tainacan-photoswipe-layer .pswp__container p:first-of-type,
.tainacan-photoswipe-layer .pswp__container article:first-of-type {
z-index: 99;
padding: 1rem 4.33337vw;
background: var(--tainacan-media-background, #ffffff);
border-radius: var(--borderRadius, 3px);
word-wrap: break-word; }
.tainacan-photoswipe-layer .pswp__container audio {
background: black;
min-height: 38px;
border-radius: 20px; }
.tainacan-photoswipe-layer .pswp__container video {
min-height: 56px; }
.tainacan-photoswipe-layer .pswp__top-bar .pswp__name {
color: white;
text-align: center;
font-size: 1.125em;
display: block;
height: 44px;
max-width: calc(100% - 240px);
width: 100%;
left: 44px;
position: absolute;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 44px;
padding: 0 10px; }
.tainacan-photoswipe-layer .pswp__figure_caption {
font-size: 0.875em;
font-style: italic; }
.tainacan-photoswipe-layer .pswp__description {
font-size: 0.9375em; }
.tainacan-photoswipe-layer .pswp__caption__center {
text-align: center;
font-size: 1em;
max-width: 800px; }
/*# sourceMappingURL=tainacan-gutenberg-block-item-gallery.css.map */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,56 @@
/*
Error: File to import not found or unreadable: ../../../node_modules/photoswipe/src/css/main.scss.
on line 11 of src/views/gutenberg-blocks/tainacan-blocks/item-gallery/style.scss
6: $pswp__root-z-index: 9999999 !default;
7: $pswp__assets-path: '../images/' !default; // path to skin assets folder (preloader, PNG and SVG sprite)
8: $pswp__error-text-color: #CCC !default; // "Image not loaded" text color
9: $pswp__include-minimal-style: true !default;
10:
11: @import '../../../node_modules/photoswipe/src/css/main.scss';
12: @import '../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss';
13:
14: .tainacan-media-component {
15: --swiper-theme-color: var(--tainacan-secondary, #298596);
16: --swiper-navigation-size: 44px;
Backtrace:
src/views/gutenberg-blocks/tainacan-blocks/item-gallery/style.scss:11
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/import_node.rb:67:in `rescue in import'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/import_node.rb:45:in `import'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/import_node.rb:28:in `imported_file'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/import_node.rb:37:in `css_import?'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:310:in `visit_import'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/stack.rb:79:in `block in with_base'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/stack.rb:135:in `with_frame'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/stack.rb:79:in `with_base'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:158:in `visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `map'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:52:in `visit_children'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `block in visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/base.rb:36:in `visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:157:in `visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/visitors/perform.rb:10:in `visit'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/root_node.rb:36:in `css_tree'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/tree/root_node.rb:29:in `render_with_sourcemap'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/engine.rb:389:in `_render_with_sourcemap'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/engine.rb:307:in `render_with_sourcemap'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/exec/sass_scss.rb:387:in `run'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/exec/sass_scss.rb:63:in `process_result'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/exec/base.rb:50:in `parse'
/var/lib/gems/2.3.0/gems/sass-3.7.4/lib/sass/exec/base.rb:18:in `parse!'
/var/lib/gems/2.3.0/gems/sass-3.7.4/bin/sass:13:in `<top (required)>'
/usr/local/bin/sass:22:in `load'
/usr/local/bin/sass:22:in `<main>'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Error: File to import not found or unreadable: ../../../node_modules/photoswipe/src/css/main.scss.\A on line 11 of src/views/gutenberg-blocks/tainacan-blocks/item-gallery/style.scss\A \A 6: $pswp__root-z-index: 9999999 !default;\A 7: $pswp__assets-path: '../images/' !default; // path to skin assets folder (preloader, PNG and SVG sprite)\A 8: $pswp__error-text-color: #CCC !default; // \"Image not loaded\" text color\A 9: $pswp__include-minimal-style: true !default;\A 10: \A 11: @import '../../../node_modules/photoswipe/src/css/main.scss';\A 12: @import '../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss';\A 13: \A 14: .tainacan-media-component {\A 15: --swiper-theme-color: var(--tainacan-secondary, #298596);\A 16: --swiper-navigation-size: 44px;"; }

View File

@ -1,8 +1,6 @@
#tainacan-reports-app {
padding: 10px 2px 10px 2px;
margin: 0; }
#tainacan-reports-app .tainacan-icon::before {
opacity: 0.0; }
#tainacan-reports-app a:hover {
cursor: pointer; }
#tainacan-reports-app .tainacan-reports-header {

View File

@ -1,6 +1,6 @@
{
"version": 3,
"mappings": "AAAA,qBAAsB;EAClB,OAAO,EAAE,iBAAiB;EAC1B,MAAM,EAAE,CAAC;EAGT,4CAAuB;IACnB,OAAO,EAAE,GAAG;EAGhB,6BAAQ;IACJ,MAAM,EAAE,OAAO;EAGnB,8CAAyB;IACrB,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,kBAAkB;IAE1B,iEAAmB;MACf,MAAM,EAAE,IAAI;IAGhB,qDAAO;MACH,YAAY,EAAE,IAAI;MAClB,WAAW,EAAE,GAAG;EAGxB,iDAA4B;IACxB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,gBAAgB;IAC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,MAAM;MACvB,WAAW,EAAE,UAAU;MACvB,cAAc,EAAE,MAAM;MAEtB,+EAAE;QACE,aAAa,EAAE,GAAG;QAClB,SAAS,EAAE,OAAO;EAK9B,+CAA0B;IACtB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM",
"sources": ["../../views/reports/tainacan-reports.scss"],
"names": [],
"file": "tainacan-reports.css"

View File

@ -336,12 +336,12 @@ function tainacan_get_the_media_component(
// Modal lightbox layer for rendering photoswipe
add_action('wp_footer', 'tainacan_get_the_media_modal_layer');
wp_enqueue_style( 'tainacan-media-component', $TAINACAN_BASE_URL . '/assets/css/media-component.css', array(), TAINACAN_VERSION);
wp_enqueue_script( 'tainacan-media-component', $TAINACAN_BASE_URL . '/assets/js/media_component.js', ['wp-i18n'], TAINACAN_VERSION, true );
wp_localize_script('tainacan-media-component', 'tainacan_plugin', \Tainacan\Admin::get_instance()->get_admin_js_localization_params());
wp_enqueue_style( 'tainacan-media-component', $TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-item-gallery.css', array(), TAINACAN_VERSION);
//wp_enqueue_script( 'tainacan-media-component', $TAINACAN_BASE_URL . '/assets/js/media_component.js', ['wp-i18n'], TAINACAN_VERSION, true );
//wp_localize_script('tainacan-media-component', 'tainacan_plugin', \Tainacan\Admin::get_instance()->get_admin_js_localization_params());
?>
<div class="tainacan-media-component">
<div class="tainacan-media-component" data-module='item-gallery'>
<?php if ( $args['has_media_main'] ) : ?>

View File

@ -1,7 +1,7 @@
<template>
<div
id="tainacan-admin-app"
class="columns is-fullheight"
class="has-mounted columns is-fullheight"
:class="{
'tainacan-admin-iframe-mode': isIframeMode,
'tainacan-admin-read-mode': isReadMode

View File

@ -0,0 +1,195 @@
// Overrides lodash by original WordPress Underscore Library
//window.lodash = _.noConflict();
//window.underscore = _.noConflict();
// Main imports
import Vue from 'vue';
import Buefy from 'buefy';
import VTooltip from 'v-tooltip';
import VueMasonry from 'vue-masonry-css';
import draggable from 'vuedraggable';
import VueTheMask from 'vue-the-mask';
import cssVars from 'css-vars-ponyfill';
import VueBlurHash from 'vue-blurhash';
// Metadata Types
import Text from '../components/metadata-types/text/Text.vue';
import Textarea from '../components/metadata-types/textarea/Textarea.vue';
import Selectbox from '../components/metadata-types/selectbox/Selectbox.vue';
import Numeric from '../components/metadata-types/numeric/Numeric.vue';
import Date from '../components/metadata-types/date/Date.vue';
import Relationship from '../components/metadata-types/relationship/Relationship.vue';
import Taxonomy from '../components/metadata-types/taxonomy/Taxonomy.vue';
import Compound from '../components/metadata-types/compound/Compound.vue';
import User from '../components/metadata-types/user/User.vue';
import FormText from '../components/metadata-types/text/FormText.vue';
import FormRelationship from '../components/metadata-types/relationship/FormRelationship.vue';
import FormTaxonomy from '../components/metadata-types/taxonomy/FormTaxonomy.vue';
import FormSelectbox from '../components/metadata-types/selectbox/FormSelectbox.vue';
import FormNumeric from '../components/metadata-types/numeric/FormNumeric.vue';
import FormUser from '../components/metadata-types/user/FormUser.vue';
import FilterNumeric from '../components/filter-types/numeric/Numeric.vue';
import FilterDate from '../components/filter-types/date/Date.vue';
import FilterSelectbox from '../components/filter-types/selectbox/Selectbox.vue';
import FilterAutocomplete from '../components/filter-types/autocomplete/Autocomplete.vue';
import FilterCheckbox from '../components/filter-types/checkbox/Checkbox.vue';
import FilterTaginput from '../components/filter-types/taginput/Taginput.vue';
import FilterNumericInterval from '../components/filter-types/numeric-interval/NumericInterval.vue';
import FilterDateInterval from '../components/filter-types/date-interval/DateInterval.vue';
import FilterNumericListInterval from '../components/filter-types/numeric-list-interval/NumericListInterval.vue';
import FilterTaxonomyCheckbox from '../components/filter-types/taxonomy/Checkbox.vue';
import FilterTaxonomyTaginput from '../components/filter-types/taxonomy/Taginput.vue';
// Term edition form must be imported here so that it is not necessary on item-submission bundle
import TermEditionForm from '../components/edition/term-edition-form.vue';
import FormFilterNumeric from '../components/filter-types/numeric/FormNumeric.vue';
import FormFilterNumericInterval from '../components/filter-types/numeric-interval/FormNumericInterval.vue';
import FormFilterNumericListInterval from '../components/filter-types/numeric-list-interval/FormNumericListInterval.vue';
// import FormDate from '../../../classes/filter-types/date/FormDate.vue';
import TainacanFormItem from '../components/metadata-types/tainacan-form-item.vue';
import TainacanFiltersList from '../components/filter-types/tainacan-filter-item.vue';
// Remaining imports
import AdminPage from '../admin.vue'
import HelpButton from '../components/other/help-button.vue';
import TainacanTitle from '../components/navigation/tainacan-title.vue';
import store from './store/store'
import router from './router'
import eventBusSearch from './event-bus-search';
import eventBusTermsList from './event-bus-terms-list.js';
import {
I18NPlugin,
UserPrefsPlugin,
RouterHelperPlugin,
ConsolePlugin,
UserCapabilitiesPlugin,
StatusHelperPlugin,
CommentsStatusHelperPlugin
} from './admin-utilities';
import {
ThumbnailHelperPlugin
} from './utilities';
export default (element) => {
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
function renderTainacanAdminPage() {
// Gets the div with the content of the page
let pageElement = element ? element : document.getElementById('tainacan-admin-app');
// Mount only if the div exists and it is not already mounted
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
if (typeof window.tainacan_extra_plugins != "undefined") {
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
Vue.use(extraVuePluginObject);
}
// Configure and Register Plugins
Vue.use(Buefy, {
defaultTooltipAnimated: true
});
Vue.use(VTooltip);
Vue.use(VueMasonry);
Vue.use(VueBlurHash);
Vue.use(I18NPlugin);
Vue.use(UserPrefsPlugin);
Vue.use(RouterHelperPlugin);
Vue.use(UserCapabilitiesPlugin);
Vue.use(ThumbnailHelperPlugin);
Vue.use(StatusHelperPlugin);
Vue.use(ConsolePlugin, {visual: false});
Vue.use(VueTheMask);
Vue.use(CommentsStatusHelperPlugin);
/* Registers Extra Vue Components passed to the window.tainacan_extra_components */
if (typeof window.tainacan_extra_components != "undefined") {
for (let [extraVueComponentName, extraVueComponentObject] of Object.entries(window.tainacan_extra_components)) {
Vue.component(extraVueComponentName, extraVueComponentObject);
}
}
/* Metadata */
Vue.component('tainacan-text', Text);
Vue.component('tainacan-textarea', Textarea);
Vue.component('tainacan-selectbox', Selectbox);
Vue.component('tainacan-numeric', Numeric);
Vue.component('tainacan-date', Date);
Vue.component('tainacan-relationship', Relationship);
Vue.component('tainacan-taxonomy', Taxonomy);
Vue.component('tainacan-compound', Compound);
Vue.component('tainacan-user', User);
/* Metadata Option forms */
Vue.component('tainacan-form-text', FormText);
Vue.component('tainacan-form-relationship', FormRelationship);
Vue.component('tainacan-form-taxonomy', FormTaxonomy);
Vue.component('tainacan-form-selectbox', FormSelectbox);
Vue.component('tainacan-form-numeric', FormNumeric);
Vue.component('tainacan-form-user', FormUser);
Vue.component('term-edition-form', TermEditionForm);
/* Filters */
Vue.component('tainacan-filter-numeric', FilterNumeric);
Vue.component('tainacan-filter-date', FilterDate);
Vue.component('tainacan-filter-selectbox', FilterSelectbox);
Vue.component('tainacan-filter-autocomplete', FilterAutocomplete);
Vue.component('tainacan-filter-checkbox', FilterCheckbox);
Vue.component('tainacan-filter-taginput', FilterTaginput);
Vue.component('tainacan-filter-taxonomy-checkbox', FilterTaxonomyCheckbox);
Vue.component('tainacan-filter-taxonomy-taginput', FilterTaxonomyTaginput);
Vue.component('tainacan-filter-numeric-interval', FilterNumericInterval);
Vue.component('tainacan-filter-numeric-list-interval', FilterNumericListInterval);
Vue.component('tainacan-filter-date-interval', FilterDateInterval);
/* Filter Metadata Option forms */
Vue.component('tainacan-filter-form-numeric', FormFilterNumeric);
Vue.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval);
Vue.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval);
// Vue.component('tainacan-filter-form-date', FormDate);
// Filter and Metadadum parent containers
Vue.component('tainacan-form-item', TainacanFormItem);
Vue.component('tainacan-filter-item', TainacanFiltersList);
/* Others */
Vue.component('help-button', HelpButton);
Vue.component('draggable', draggable);
Vue.component('tainacan-title', TainacanTitle);
Vue.use(eventBusTermsList, {});
Vue.use(eventBusSearch, { store: store, router: router});
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
new Vue({
el: '#tainacan-admin-app',
store,
router,
render: h => h(AdminPage)
});
// Initialize Ponyfill for Custom CSS properties
cssVars({
// Options...
});
}
}
// This is rendered on the admin page.
renderTainacanAdminPage();
};

View File

@ -1,203 +0,0 @@
// Overrides lodash by original WordPress Underscore Library
//window.lodash = _.noConflict();
//window.underscore = _.noConflict();
// Main imports
import Vue from 'vue';
import Buefy from 'buefy';
import VTooltip from 'v-tooltip';
import VueMasonry from 'vue-masonry-css';
import draggable from 'vuedraggable';
import VueTheMask from 'vue-the-mask';
import cssVars from 'css-vars-ponyfill';
import VueBlurHash from 'vue-blurhash';
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
// Metadata Types
import Text from '../components/metadata-types/text/Text.vue';
import Textarea from '../components/metadata-types/textarea/Textarea.vue';
import Selectbox from '../components/metadata-types/selectbox/Selectbox.vue';
import Numeric from '../components/metadata-types/numeric/Numeric.vue';
import Date from '../components/metadata-types/date/Date.vue';
import Relationship from '../components/metadata-types/relationship/Relationship.vue';
import Taxonomy from '../components/metadata-types/taxonomy/Taxonomy.vue';
import Compound from '../components/metadata-types/compound/Compound.vue';
import User from '../components/metadata-types/user/User.vue';
import FormText from '../components/metadata-types/text/FormText.vue';
import FormRelationship from '../components/metadata-types/relationship/FormRelationship.vue';
import FormTaxonomy from '../components/metadata-types/taxonomy/FormTaxonomy.vue';
import FormSelectbox from '../components/metadata-types/selectbox/FormSelectbox.vue';
import FormNumeric from '../components/metadata-types/numeric/FormNumeric.vue';
import FormUser from '../components/metadata-types/user/FormUser.vue';
import FilterNumeric from '../components/filter-types/numeric/Numeric.vue';
import FilterDate from '../components/filter-types/date/Date.vue';
import FilterSelectbox from '../components/filter-types/selectbox/Selectbox.vue';
import FilterAutocomplete from '../components/filter-types/autocomplete/Autocomplete.vue';
import FilterCheckbox from '../components/filter-types/checkbox/Checkbox.vue';
import FilterTaginput from '../components/filter-types/taginput/Taginput.vue';
import FilterNumericInterval from '../components/filter-types/numeric-interval/NumericInterval.vue';
import FilterDateInterval from '../components/filter-types/date-interval/DateInterval.vue';
import FilterNumericListInterval from '../components/filter-types/numeric-list-interval/NumericListInterval.vue';
import FilterTaxonomyCheckbox from '../components/filter-types/taxonomy/Checkbox.vue';
import FilterTaxonomyTaginput from '../components/filter-types/taxonomy/Taginput.vue';
// Term edition form must be imported here so that it is not necessary on item-submission bundle
import TermEditionForm from '../components/edition/term-edition-form.vue';
import FormFilterNumeric from '../components/filter-types/numeric/FormNumeric.vue';
import FormFilterNumericInterval from '../components/filter-types/numeric-interval/FormNumericInterval.vue';
import FormFilterNumericListInterval from '../components/filter-types/numeric-list-interval/FormNumericListInterval.vue';
// import FormDate from '../../../classes/filter-types/date/FormDate.vue';
import TainacanFormItem from '../components/metadata-types/tainacan-form-item.vue';
import TainacanFiltersList from '../components/filter-types/tainacan-filter-item.vue';
// Remaining imports
import AdminPage from '../admin.vue'
import HelpButton from '../components/other/help-button.vue';
import TainacanTitle from '../components/navigation/tainacan-title.vue';
import store from './store/store'
import router from './router'
import eventBusSearch from './event-bus-search';
import eventBusTermsList from './event-bus-terms-list.js';
import {
I18NPlugin,
UserPrefsPlugin,
RouterHelperPlugin,
ConsolePlugin,
UserCapabilitiesPlugin,
StatusHelperPlugin,
CommentsStatusHelperPlugin
} from './admin-utilities';
import {
ThumbnailHelperPlugin
} from './utilities';
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
if (typeof window.tainacan_extra_plugins != "undefined") {
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
Vue.use(extraVuePluginObject);
}
// Configure and Register Plugins
Vue.use(Buefy, {
defaultTooltipAnimated: true
});
Vue.use(VTooltip);
Vue.use(VueMasonry);
Vue.use(VueBlurHash);
Vue.use(I18NPlugin);
Vue.use(UserPrefsPlugin);
Vue.use(RouterHelperPlugin);
Vue.use(UserCapabilitiesPlugin);
Vue.use(ThumbnailHelperPlugin);
Vue.use(StatusHelperPlugin);
Vue.use(ConsolePlugin, {visual: false});
Vue.use(VueTheMask);
Vue.use(CommentsStatusHelperPlugin);
/* Registers Extra Vue Components passed to the window.tainacan_extra_components */
if (typeof window.tainacan_extra_components != "undefined") {
for (let [extraVueComponentName, extraVueComponentObject] of Object.entries(window.tainacan_extra_components)) {
Vue.component(extraVueComponentName, extraVueComponentObject);
}
}
/* Metadata */
Vue.component('tainacan-text', Text);
Vue.component('tainacan-textarea', Textarea);
Vue.component('tainacan-selectbox', Selectbox);
Vue.component('tainacan-numeric', Numeric);
Vue.component('tainacan-date', Date);
Vue.component('tainacan-relationship', Relationship);
Vue.component('tainacan-taxonomy', Taxonomy);
Vue.component('tainacan-compound', Compound);
Vue.component('tainacan-user', User);
/* Metadata Option forms */
Vue.component('tainacan-form-text', FormText);
Vue.component('tainacan-form-relationship', FormRelationship);
Vue.component('tainacan-form-taxonomy', FormTaxonomy);
Vue.component('tainacan-form-selectbox', FormSelectbox);
Vue.component('tainacan-form-numeric', FormNumeric);
Vue.component('tainacan-form-user', FormUser);
Vue.component('term-edition-form', TermEditionForm);
/* Filters */
Vue.component('tainacan-filter-numeric', FilterNumeric);
Vue.component('tainacan-filter-date', FilterDate);
Vue.component('tainacan-filter-selectbox', FilterSelectbox);
Vue.component('tainacan-filter-autocomplete', FilterAutocomplete);
Vue.component('tainacan-filter-checkbox', FilterCheckbox);
Vue.component('tainacan-filter-taginput', FilterTaginput);
Vue.component('tainacan-filter-taxonomy-checkbox', FilterTaxonomyCheckbox);
Vue.component('tainacan-filter-taxonomy-taginput', FilterTaxonomyTaginput);
Vue.component('tainacan-filter-numeric-interval', FilterNumericInterval);
Vue.component('tainacan-filter-numeric-list-interval', FilterNumericListInterval);
Vue.component('tainacan-filter-date-interval', FilterDateInterval);
/* Filter Metadata Option forms */
Vue.component('tainacan-filter-form-numeric', FormFilterNumeric);
Vue.component('tainacan-filter-form-numeric-interval', FormFilterNumericInterval);
Vue.component('tainacan-filter-form-numeric-list-interval', FormFilterNumericListInterval);
// Vue.component('tainacan-filter-form-date', FormDate);
// Filter and Metadadum parent containers
Vue.component('tainacan-form-item', TainacanFormItem);
Vue.component('tainacan-filter-item', TainacanFiltersList);
/* Others */
Vue.component('help-button', HelpButton);
Vue.component('draggable', draggable);
Vue.component('tainacan-title', TainacanTitle);
Vue.use(eventBusTermsList, {});
Vue.use(eventBusSearch, { store: store, router: router});
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
new Vue({
el: '#tainacan-admin-app',
store,
router,
render: h => h(AdminPage)
});
// Display Icons only once everything is loaded
function listen(evnt, elem, func) {
if (elem.addEventListener) // W3C DOM
elem.addEventListener(evnt,func,false);
else if (elem.attachEvent) { // IE DOM
var r = elem.attachEvent("on"+evnt, func);
return r;
} else if (document.head) {
var iconHideStyle = document.createElement("style");
iconHideStyle.innerText = '.tainacan-icon{ opacity: 1 !important; }';
document.head.appendChild(iconHideStyle);
} else {
var iconHideStyle = document.createElement("style");
iconHideStyle.innerText = '.tainacan-icon{ opacity: 1 !important; }';
document.getElementsByTagName("head")[0].appendChild(iconHideStyle);
}
}
listen("load", window, function() {
var iconsStyle = document.createElement("style");
iconsStyle.setAttribute('type', 'text/css');
iconsStyle.innerText = '.tainacan-icon{ opacity: 1 !important; }';
document.head.appendChild(iconsStyle);
});
// Initialize Ponyfill for Custom CSS properties
cssVars({
// Options...
});

View File

@ -73,9 +73,6 @@ body.tainacan-admin-page #wp-auth-check-wrap {
}
// Tainacan Loading
.tainacan-icon {
opacity: 0; // Will make it 1 once window.load is done;
}
.loading-overlay {
z-index: 9999999999;
min-height: auto !important;

View File

@ -127,11 +127,16 @@ class Admin {
global $TAINACAN_BASE_URL;
wp_enqueue_script( 'tainacan-roles', $TAINACAN_BASE_URL . '/assets/js/roles.js', ['underscore', 'wp-i18n'], TAINACAN_VERSION, true );
wp_set_script_translations('tainacan-roles', 'tainacan');
wp_enqueue_script(
'tainacan-admin-common-scripts',
$TAINACAN_BASE_URL . '/assets/js/tainacan_admin_common_scripts.js',
['underscore', 'wp-i18n'],
TAINACAN_VERSION
);
wp_set_script_translations('tainacan-admin-common-scripts', 'tainacan');
$settings = $this->get_admin_js_localization_params();
wp_localize_script( 'tainacan-roles', 'tainacan_plugin', $settings );
wp_localize_script( 'tainacan-admin-common-scripts', 'tainacan_plugin', $settings );
wp_enqueue_script('underscore');
wp_enqueue_script('wp-i18n');
@ -140,13 +145,11 @@ class Admin {
function roles_page() {
global $TAINACAN_BASE_URL;
// TODO move it to a separate file and start the Vue project
echo "<div id='tainacan-roles-app'></div>";
echo "<div id='tainacan-roles-app' data-module='roles'></div>";
}
function add_reports_css() {
global $TAINACAN_BASE_URL;
wp_enqueue_style( 'tainacan-fonts', $TAINACAN_BASE_URL . '/assets/css/tainacanicons.css', [], TAINACAN_VERSION );
wp_enqueue_style( 'tainacan-reports-page', $TAINACAN_BASE_URL . '/assets/css/tainacan-reports.css', [], TAINACAN_VERSION );
}
@ -155,11 +158,16 @@ class Admin {
global $TAINACAN_BASE_URL;
wp_enqueue_script( 'tainacan-reports', $TAINACAN_BASE_URL . '/assets/js/reports.js', ['underscore', 'wp-i18n'], TAINACAN_VERSION, true );
wp_set_script_translations('tainacan-reports', 'tainacan');
wp_enqueue_script(
'tainacan-admin-common-scripts',
$TAINACAN_BASE_URL . '/assets/js/tainacan_admin_common_scripts.js',
['underscore', 'wp-i18n'],
TAINACAN_VERSION
);
wp_set_script_translations('tainacan-admin-common-scripts', 'tainacan');
$settings = $this->get_admin_js_localization_params();
wp_localize_script( 'tainacan-reports', 'tainacan_plugin', $settings );
wp_localize_script( 'tainacan-admin-common-scripts', 'tainacan_plugin', $settings );
wp_enqueue_script('underscore');
wp_enqueue_script('wp-i18n');
@ -168,8 +176,7 @@ class Admin {
function reports_page() {
global $TAINACAN_BASE_URL;
// TODO move it to a separate file and start the Vue project
echo "<div id='tainacan-reports-app'></div>";
echo "<div id='tainacan-reports-app' data-module='reports'></div>";
}
function add_admin_css() {
@ -217,18 +224,22 @@ class Admin {
global $TAINACAN_BASE_URL;
global $TAINACAN_EXTRA_SCRIPTS;
$deps = ['underscore', 'media-editor', 'media-views', 'customize-controls'];
$deps = ['underscore', 'media-editor', 'media-views', 'customize-controls', 'wp-i18n'];
if ( !empty($TAINACAN_EXTRA_SCRIPTS) ) {
foreach($TAINACAN_EXTRA_SCRIPTS as $dep) {
$deps[] = $dep;
}
}
wp_enqueue_script( 'tainacan-admin', $TAINACAN_BASE_URL . '/assets/js/admin.js', $deps, TAINACAN_VERSION, true );
wp_enqueue_script(
'tainacan-admin-common-scripts',
$TAINACAN_BASE_URL . '/assets/js/tainacan_admin_common_scripts.js',
$deps,
TAINACAN_VERSION
);
$settings = $this->get_admin_js_localization_params();
wp_localize_script( 'tainacan-admin', 'tainacan_plugin', $settings );
wp_localize_script( 'tainacan-admin-common-scripts', 'tainacan_plugin', $settings );
wp_enqueue_media(
//[ 'post' => 131528 ]
);
@ -244,7 +255,7 @@ class Admin {
global $TAINACAN_BASE_URL, $TAINACAN_API_MAX_ITEMS_PER_PAGE;
$Tainacan_Collections = \Tainacan\Repositories\Collections::get_instance();
$Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance();
$Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance();
$Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance();
$Tainacan_Items = \Tainacan\Repositories\Items::get_instance();
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance();
@ -359,7 +370,7 @@ class Admin {
global $TAINACAN_BASE_URL;
// TODO move it to a separate file and start the Vue project
echo "<div id='tainacan-admin-app'></div>";
echo "<div id='tainacan-admin-app' data-module='admin'></div>";
}
function register_user_meta() {

View File

@ -29,7 +29,7 @@ function tainacan_blocks_initialize() {
if (is_plugin_active('gutenberg/gutenberg.php') || $wp_version >= '5') {
// Via Gutenberg filers, we create the Tainacan category
// Via Gutenberg filters, we create the Tainacan category
if ( class_exists('WP_Block_Editor_Context') ) { // Introduced WP 5.8
add_filter('block_categories_all', 'tainacan_blocks_register_categories', 10, 2);
} else {
@ -38,10 +38,13 @@ function tainacan_blocks_initialize() {
// On the theme side, all we need is the common scripts,
// that handle dynamically the imports using conditioner.js
add_action('init', 'tainacan_blocks_add_common_theme_scripts', 90);
// On the admin side, we need the blocks registered and their assets (editor-side)
add_action('admin_init', 'tainacan_blocks_register_and_enqueue_all_blocks');
if ( !is_admin() ) {
add_action('init', 'tainacan_blocks_add_common_theme_scripts', 90);
// On the admin side, we need the blocks registered and their assets (editor-side)
} else {
add_action('admin_init', 'tainacan_blocks_register_and_enqueue_all_blocks');
}
}
}
@ -106,9 +109,14 @@ function tainacan_blocks_register_block($block_slug, $options = []) {
$editor_script_deps,
$TAINACAN_VERSION
);
wp_set_script_translations($block_slug, 'tainacan');
$register_params['editor_script'] = $block_slug;
// Passes global variables to the blocks editor side
$block_settings = tainacan_blocks_get_plugin_js_settings();
$plugin_settings = \Tainacan\Admin::get_instance()->get_admin_js_localization_params();
wp_localize_script( $block_slug, 'tainacan_blocks', $block_settings);
wp_localize_script( $block_slug, 'tainacan_plugin', $plugin_settings);
// Registers style
wp_register_style(
$block_slug,

View File

@ -55,7 +55,7 @@ export default (element) => {
// Gets the div with the content of the block
let blockElement = element ? element : document.getElementById('tainacan-items-page');
// Mount only if the div exists
// Mount only if the div exists and it is not already mounted
if ( blockElement && blockElement.classList && !blockElement.classList.contains('has-mounted') ) {
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */

View File

@ -8,8 +8,8 @@ $pswp__assets-path: '../images/' !default; // path to skin assets folder (preloa
$pswp__error-text-color: #CCC !default; // "Image not loaded" text color
$pswp__include-minimal-style: true !default;
@import '../../../node_modules/photoswipe/src/css/main.scss';
@import '../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss';
@import '../../../../../node_modules/photoswipe/src/css/main.scss';
@import '../../../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss';
.tainacan-media-component {
--swiper-theme-color: var(--tainacan-secondary, #298596);

View File

@ -369,7 +369,7 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
}
/* Loads and instantiates media components passed to the global variable */
document.addEventListener('DOMContentLoaded', function() {
export default (element) => {
if (tainacan_plugin?.classes?.TainacanMediaGallery && tainacan_plugin?.tainacan_media_components) {
(Object.values(tainacan_plugin.tainacan_media_components) || []).forEach((component) => {
new tainacan_plugin.classes.TainacanMediaGallery(
@ -379,7 +379,7 @@ document.addEventListener('DOMContentLoaded', function() {
);
});
}
});
};
/*

View File

@ -11,9 +11,6 @@ import {
StatusHelperPlugin,
} from '../../admin/js/admin-utilities';
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
import ReportsPage from '../reports.vue';
import TainacanReportsSubheader from '../components/tainacan-reports-subheader.vue';
import NumberBlock from '../components/number-block.vue';
@ -26,105 +23,98 @@ import CollectionsListBlock from '../components/collections-list-block.vue';
import ActivitiesBlock from '../components/activities-block.vue';
import ActivitiesPerUserBlock from '../components/activities-per-user-block.vue';
Vue.use(VueApexCharts)
Apex.colors = [
'#298596', // Tainacan Turquoise
'#01295c', // Tainacan Blue
'#25a189', // Tainacan Green
'#e69810', // Tainacan Yellow
'#a23939', // Tainacan Red
'#592570', // Tainacan Purple
'#ed4f63', // Tainacan Pink
'#b46659', // Tainacan Brown
'#e5721c', // Tainacan Orange
'#04a5ff', // Tainacan Other Blue
'#454647' // Tainacan Dark Gray
];
/* Sets some locale configs */
import enLocaleConfig from 'apexcharts/dist/locales/en.json';
import esLocaleConfig from 'apexcharts/dist/locales/es.json';
import frLocaleConfig from 'apexcharts/dist/locales/fr.json';
import ptBrLocaleConfig from 'apexcharts/dist/locales/pt-br.json';
const availableLocales = ['en', 'es', 'fr', 'pt-br'];
const browserLanguage = navigator.language.toLocaleLowerCase();
export default (element) => {
if (availableLocales.indexOf(browserLanguage) >= 0) {
let localeConfig = {};
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
switch(browserLanguage) {
case 'es': localeConfig = esLocaleConfig; break;
case 'fr': localeConfig = frLocaleConfig; break;
case 'pt-br': localeConfig = ptBrLocaleConfig; break;
case 'en': default: localeConfig = enLocaleConfig; break;
}
Apex.chart = {
defaultLocale: browserLanguage,
locales: [ localeConfig ]
}
}
function renderTainacanReportsPage() {
// Gets the div with the content of the page
let pageElement = element ? element : document.getElementById('tainacan-reports-app');
Vue.use(I18NPlugin);
Vue.use(UserCapabilitiesPlugin);
Vue.use(StatusHelperPlugin);
Vue.use(VTooltip);
Vue.use(Snackbar);
Vue.use(Modal);
// Mount only if the div exists and it is not already mounted
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
Vue.component('tainacan-reports-subheader', TainacanReportsSubheader);
Vue.component('number-block', NumberBlock);
Vue.component('items-per-term-block', ItemsPerTermBlock);
Vue.component('items-per-term-collection-block', ItemsPerTermCollectionBlock);
Vue.component('terms-per-taxonomy-block', TermsPerTaxonomyBlock);
Vue.component('metadata-types-block', MetadataTypesBlock);
Vue.component('metadata-distribution-block', MetadataDistributionBlock);
Vue.component('collections-list-block', CollectionsListBlock);
Vue.component('activities-block', ActivitiesBlock);
Vue.component('activities-per-user-block', ActivitiesPerUserBlock);
Vue.component('apexchart', VueApexCharts);
Apex.colors = [
'#298596', // Tainacan Turquoise
'#01295c', // Tainacan Blue
'#25a189', // Tainacan Green
'#e69810', // Tainacan Yellow
'#a23939', // Tainacan Red
'#592570', // Tainacan Purple
'#ed4f63', // Tainacan Pink
'#b46659', // Tainacan Brown
'#e5721c', // Tainacan Orange
'#04a5ff', // Tainacan Other Blue
'#454647' // Tainacan Dark Gray
];
const availableLocales = ['en', 'es', 'fr', 'pt-br'];
const browserLanguage = navigator.language.toLocaleLowerCase();
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
if (availableLocales.indexOf(browserLanguage) >= 0) {
let localeConfig = {};
new Vue({
el: '#tainacan-reports-app',
store,
router,
render: h => h(ReportsPage)
});
switch(browserLanguage) {
case 'es': localeConfig = esLocaleConfig; break;
case 'fr': localeConfig = frLocaleConfig; break;
case 'pt-br': localeConfig = ptBrLocaleConfig; break;
case 'en': default: localeConfig = enLocaleConfig; break;
}
Apex.chart = {
defaultLocale: browserLanguage,
locales: [ localeConfig ]
}
}
listen("load", window, function() {
var iconsStyle = document.createElement("style");
iconsStyle.setAttribute('type', 'text/css');
iconsStyle.innerText = '.tainacan-icon::before{ opacity: 1.0 !important; }';
document.head.appendChild(iconsStyle);
});
Vue.use(VueApexCharts)
// Initialize Ponyfill for Custom CSS properties
cssVars({
// Options...
});
Vue.use(I18NPlugin);
Vue.use(UserCapabilitiesPlugin);
Vue.use(StatusHelperPlugin);
Vue.use(VTooltip);
Vue.use(Snackbar);
Vue.use(Modal);
// Display Icons only once everything is loaded
function listen(evnt, elem, func) {
if (elem.addEventListener) // W3C DOM
elem.addEventListener(evnt,func,false);
else if (elem.attachEvent) { // IE DOM
var r = elem.attachEvent("on"+evnt, func);
return r;
} else if (document.head) {
var iconHideStyle = document.createElement("style");
iconHideStyle.innerText = '.tainacan-icon::before{ opacity: 0.0 !important; }';
document.head.appendChild(iconHideStyle);
} else {
var iconHideStyle = document.createElement("style");
iconHideStyle.innerText = '.tainacan-icon::before{ opacity: 0.0 !important; }';
document.getElementsByTagName("head")[0].appendChild(iconHideStyle);
}
}
Vue.component('tainacan-reports-subheader', TainacanReportsSubheader);
Vue.component('number-block', NumberBlock);
Vue.component('items-per-term-block', ItemsPerTermBlock);
Vue.component('items-per-term-collection-block', ItemsPerTermCollectionBlock);
Vue.component('terms-per-taxonomy-block', TermsPerTaxonomyBlock);
Vue.component('metadata-types-block', MetadataTypesBlock);
Vue.component('metadata-distribution-block', MetadataDistributionBlock);
Vue.component('collections-list-block', CollectionsListBlock);
Vue.component('activities-block', ActivitiesBlock);
Vue.component('activities-per-user-block', ActivitiesPerUserBlock);
Vue.component('apexchart', VueApexCharts);
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
new Vue({
el: '#tainacan-reports-app',
store,
router,
render: h => h(ReportsPage)
});
// Initialize Ponyfill for Custom CSS properties
cssVars({
// Options...
});
}
};
// This is rendered on the reports page.
renderTainacanReportsPage();
};

View File

@ -1,7 +1,7 @@
<template>
<div
id="tainacan-reports-app"
class="wrap">
class="has-mounted wrap">
<router-view />
</div>
</template>

View File

@ -2,11 +2,6 @@
padding: 10px 2px 10px 2px;
margin: 0;
// Tainacan Loading
.tainacan-icon::before {
opacity: 0.0; // Will make it 1 once window.load is done;
}
a:hover {
cursor: pointer;
}

View File

@ -4,28 +4,45 @@ import router from './roles-router';
import VTooltip from 'v-tooltip';
import { Snackbar, Modal } from 'buefy';
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
import { I18NPlugin } from './wp-i18n-plugin';
import RolesPage from '../roles.vue';
Vue.use(I18NPlugin);
Vue.use(VTooltip);
Vue.use(Snackbar);
Vue.use(Modal);
export default (element) => {
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
// Vue Dev Tools!
Vue.config.devtools = process && process.env && process.env.NODE_ENV === 'development';
function renderTainacanRolePage() {
// Gets the div with the content of the page
let pageElement = element ? element : document.getElementById('tainacan-roles-app');
// Mount only if the div exists and it is not already mounted
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
Vue.use(I18NPlugin);
Vue.use(VTooltip);
Vue.use(Snackbar);
Vue.use(Modal);
// Changing title of pages
router.beforeEach((to, from, next) => {
document.title = to.meta.title;
if (next() != undefined)
next();
});
new Vue({
el: '#tainacan-roles-app',
store,
router,
render: h => h(RolesPage)
});
};
};
// This is rendered on the admin page.
renderTainacanRolePage();
};
new Vue({
el: '#tainacan-roles-app',
store,
router,
render: h => h(RolesPage)
});

View File

@ -1,7 +1,7 @@
<template>
<div
id="tainacan-roles-app"
class="wrap">
class="has-mounted wrap">
<router-view />
</div>
</template>

View File

@ -0,0 +1,36 @@
import * as conditioner from 'conditioner-core/conditioner-core.esm';
// Updates Webpack public path based on plugin folder URL, using variable obtained from server side.
__webpack_public_path__ = tainacan_plugin.plugin_dir_url + 'assets/js/';
// Checks if document is loaded
const performWhenDocumentIsLoaded = callback => {
if (/comp|inter|loaded/.test(document.readyState))
cb();
else
document.addEventListener('DOMContentLoaded', callback, false);
}
performWhenDocumentIsLoaded(() => {
conditioner.addPlugin({
// converts module aliases to paths
moduleSetName: name => `./${name}/js/${name}-main.js`,
// use default exports as constructor
moduleGetConstructor: module => module.default,
// override the import (this makes webpack bundle all the dynamically included files as well)
// https://webpack.js.org/api/module-methods/#import-
// - set to "eager" to create a single chunk for all modules
// - set to "lazy" to create a separate chunk for each module
moduleImport: name => import(
/* webpackMode: "lazy" */
/* webpackInclude: /main\.js$/ */
/* webpackChunkName: "tainacan-chunks-" */
`${name}`)
});
// lets go!
conditioner.hydrate(document.documentElement);
});

View File

@ -4,10 +4,7 @@ const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
module.exports = {
entry: {
admin: './src/views/admin/js/main.js',
roles: './src/views/roles/js/roles-main.js',
reports: './src/views/reports/js/reports-main.js',
media_component: './src/views/media-component/media-component.js',
tainacan_admin_common_scripts: './src/views/tainacan-admin-common-scripts.js',
tainacan_blocks_category_icon: './src/views/gutenberg-blocks/js/tainacan-blocks-category-icon.js',
tainacan_blocks_common_theme_scripts: './src/views/gutenberg-blocks/tainacan-blocks/tainacan-blocks-common-theme-scripts.js',