commit
db930b4ea5
|
@ -119,7 +119,7 @@
|
|||
margin: 0 50px; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container a > span,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -129,7 +129,9 @@
|
|||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container a > img {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container a,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid a {
|
||||
width: 100%;
|
||||
|
@ -163,7 +165,7 @@
|
|||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, #555758);
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px; }
|
||||
|
@ -235,7 +237,7 @@
|
|||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px 32px 16px 0px;
|
||||
margin: 8px 32px 8px 0px;
|
||||
width: calc(16.666% - 32px);
|
||||
min-width: calc(16.666% - 32px);
|
||||
scroll-snap-align: start;
|
||||
|
@ -245,7 +247,7 @@
|
|||
width: calc(25% - 16px);
|
||||
min-width: calc(25% - 16px); }
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item img {
|
||||
|
@ -255,7 +257,7 @@
|
|||
display: block;
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item button {
|
||||
position: absolute !important;
|
||||
|
@ -444,4 +446,10 @@
|
|||
width: calc(100% - 32px);
|
||||
min-width: calc(100% - 32px); } }
|
||||
|
||||
.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,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-collections-list li.collection-list-item a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647); }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-carousel-collections-list.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -126,7 +126,7 @@
|
|||
margin: 0 50px; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper-container a > span,
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper-container a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -136,13 +136,16 @@
|
|||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper-container a > img {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper-container a,
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper-container a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-items-list .preview-warning {
|
||||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, #555758);
|
||||
color: inherit;
|
||||
opacity: 0.5;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px; }
|
||||
|
@ -212,13 +215,13 @@
|
|||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px;
|
||||
margin: 8px 16px;
|
||||
width: calc(14.285% - 32px);
|
||||
min-width: calc(14.285% - 32px);
|
||||
scroll-snap-align: start;
|
||||
scroll-margin: 0 16px; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item img {
|
||||
|
@ -227,7 +230,7 @@
|
|||
padding: 0px;
|
||||
margin-bottom: 0.5em; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item button {
|
||||
position: absolute !important;
|
||||
|
@ -396,4 +399,10 @@
|
|||
width: calc(100% - 32px);
|
||||
min-width: calc(100% - 32px); } }
|
||||
|
||||
.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,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-items-list li.item-list-item a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647); }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-carousel-items-list.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -119,7 +119,7 @@
|
|||
margin: 0 50px; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container a > span,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -129,7 +129,9 @@
|
|||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container a > img {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container a,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container .swiper-slide.term-list-item-grid a {
|
||||
width: 100%;
|
||||
|
@ -163,7 +165,7 @@
|
|||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, #555758);
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px; }
|
||||
|
@ -236,7 +238,7 @@
|
|||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px 32px 16px 0px;
|
||||
margin: 8px 32px 8px 0px;
|
||||
width: calc(16.666% - 32px);
|
||||
min-width: calc(16.666% - 32px);
|
||||
scroll-snap-align: start;
|
||||
|
@ -246,7 +248,7 @@
|
|||
width: calc(25% - 16px);
|
||||
min-width: calc(25% - 16px); }
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item img {
|
||||
|
@ -256,7 +258,7 @@
|
|||
display: block;
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item button {
|
||||
position: absolute !important;
|
||||
|
@ -444,4 +446,10 @@
|
|||
width: calc(100% - 32px);
|
||||
min-width: calc(100% - 32px); } }
|
||||
|
||||
.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,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-carousel-terms-list li.term-list-item a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647); }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-carousel-terms-list.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,7 +44,7 @@
|
|||
width: 185px; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
|
@ -58,9 +58,10 @@
|
|||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item a.collection-without-name span,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item a.collection-without-name span {
|
||||
display: none; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item:hover a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item a, .wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item:hover a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit li.collection-list-item {
|
||||
display: flex;
|
||||
|
@ -121,7 +122,7 @@
|
|||
width: calc(20% - 24px); }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -137,9 +138,10 @@
|
|||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a.collection-without-image img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a.collection-without-image img {
|
||||
display: none; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item:hover a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a, .wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item:hover a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
@media only screen and (max-width: 1600px) {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item,
|
||||
|
@ -162,4 +164,8 @@
|
|||
min-width: calc(100% - 24px);
|
||||
width: calc(100% - 24px); } }
|
||||
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-collections-list li.collection-list-item a > span,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-collections-list li.collection-list-item a:hover > span {
|
||||
color: inherit; }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-collections-list.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAEA,mCAAoC;EAChC,MAAM,EAAE,QAAQ;EAGhB,uDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;gGAC2D;IACvD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;8FACyD;IACrD,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;mGAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;yGAAI;QACA,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;sFACiD;IAC7C,OAAO,EAAE,CAAC;ICtCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDqCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;gHAAwB;MACpB,QA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;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;sHAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAItB;iJAA+B;QAC3B,OAAO,EAAE,IAAI;MAGjB;;0HACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QApC/C;oHAAwB;UAqChB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAzC/C;oHAAwB;UA0ChB,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA9C9C;oHAAwB;UA+ChB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAnD9C;oHAAwB;UAoDhB,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;iIACa;EACT,KAAK,EAAE,OAAO",
|
||||
"sources": ["../../views/gutenberg-blocks/tainacan-blocks/collections-list/style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-collections-list.css"
|
||||
|
|
|
@ -191,7 +191,8 @@
|
|||
box-shadow: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit li.item-list-item {
|
||||
display: flex;
|
||||
align-items: flex-start; }
|
||||
align-items: flex-start;
|
||||
position: relative; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit li.item-list-item button {
|
||||
position: absolute !important;
|
||||
background-color: rgba(255, 255, 255, 0.75);
|
||||
|
@ -330,7 +331,7 @@
|
|||
align-items: center; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
|
@ -358,9 +359,10 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item a.item-without-title > span,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item a.item-without-title > span {
|
||||
display: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item a, .wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
@media only screen and (max-width: 498px) {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid,
|
||||
|
@ -498,7 +500,7 @@
|
|||
padding: 12px 12px 24px 12px; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -522,9 +524,10 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img {
|
||||
display: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a, .wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic {
|
||||
|
@ -564,7 +567,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item img,
|
||||
|
@ -586,9 +589,10 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item a.item-without-title > span,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item a.item-without-title > span {
|
||||
display: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item a, .wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container.mosaic-container--1-2x3 li.item-list-item,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container.mosaic-container--1-2x3 li.item-list-item {
|
||||
|
@ -912,4 +916,8 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container {
|
||||
min-width: 240px; } }
|
||||
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-dynamic-items-list li.item-list-item a > span,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-dynamic-items-list li.item-list-item a:hover > span {
|
||||
color: var(--tainacan-block-gray5, #454647); }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-dynamic-items-list.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -317,11 +317,23 @@
|
|||
max-width: 220px; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
display: block; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item .facet-label-and-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item .facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below {
|
||||
flex-direction: column;
|
||||
align-items: flex-start; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count {
|
||||
font-weight: normal; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item:not(.facet-with-name-inside-image) img,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item:not(.facet-with-name-inside-image) img {
|
||||
height: auto;
|
||||
|
@ -330,7 +342,8 @@
|
|||
margin-bottom: 0.5em; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item:not(.facet-with-name-inside-image) span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item:not(.facet-with-name-inside-image) span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, #cbcbcb); }
|
||||
color: inherit;
|
||||
opacity: 0.65; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item.facet-with-name-inside-image a span,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item.facet-with-name-inside-image a span {
|
||||
display: block;
|
||||
|
@ -356,7 +369,7 @@
|
|||
opacity: 1; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item:hover a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid li.facet-list-item svg,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid li.facet-list-item svg {
|
||||
|
@ -495,9 +508,10 @@
|
|||
width: 100%; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
line-height: normal;
|
||||
height: auto;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
word-break: break-all;
|
||||
|
@ -514,6 +528,17 @@
|
|||
fill: var(--tainacan-block-gray4, #555758);
|
||||
margin-left: auto;
|
||||
overflow: visible; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item .facet-label-and-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item .facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below {
|
||||
flex-direction: column;
|
||||
align-items: flex-start; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count {
|
||||
font-weight: normal; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item.facet-without-image,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item.facet-without-image {
|
||||
min-height: 0.875em; }
|
||||
|
@ -526,11 +551,12 @@
|
|||
display: none; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, #cbcbcb);
|
||||
color: inherit;
|
||||
opacity: 0.65;
|
||||
word-break: break-all; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item:hover a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item.facet-term-with-children,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-list li.facet-list-item.facet-term-with-children {
|
||||
|
@ -570,9 +596,11 @@
|
|||
vertical-align: middle; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: inline;
|
||||
min-height: 54px; }
|
||||
min-height: 54px;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item img,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item img {
|
||||
height: auto;
|
||||
|
@ -586,22 +614,33 @@
|
|||
margin-left: auto;
|
||||
overflow: visible;
|
||||
margin-bottom: -12px; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item .facet-label-and-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item .facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below {
|
||||
flex-direction: column; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item .facet-label-and-count.is-style-facet-label-and-count--below span.facet-item-count {
|
||||
font-weight: normal; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item.facet-without-image img,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item.facet-without-image img {
|
||||
display: none; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item span.facet-item-count,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, #cbcbcb); }
|
||||
color: inherit;
|
||||
opacity: 0.65; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item:hover, .wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item:hover a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item:hover,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item:hover a {
|
||||
color: var(--tainacan-block-primary, #298596);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item:hover.facet-term-with-children, .wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item:hover.facet-term-with-children a,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item:hover.facet-term-with-children,
|
||||
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item:hover.facet-term-with-children a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-facets-list .show-more-button {
|
||||
margin: 12px auto;
|
||||
|
@ -616,6 +655,13 @@
|
|||
background-color: var(--tainacan-block-gray3, #cbcbcb); }
|
||||
.wp-block-tainacan-facets-list .show-more-button i > svg {
|
||||
fill: white; }
|
||||
.wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647); }
|
||||
.wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a:hover, .wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a:focus, .wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a:hover .facet-item-count, .wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a:focus .facet-item-count {
|
||||
color: var(--tainacan-block-primary, #298596); }
|
||||
.wp-block-tainacan-facets-list:not(.has-text-color) li.facet-list-item a .facet-item-count {
|
||||
opacity: 1.0;
|
||||
color: var(--tainacan-block-gray3, #cbcbcb); }
|
||||
|
||||
.child-reveal-enter-active {
|
||||
overflow: hidden;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,7 +44,7 @@
|
|||
width: 185px; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
|
@ -62,9 +62,10 @@
|
|||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item a.item-without-title span,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item a.item-without-title span {
|
||||
display: none; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item:hover a,
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item a, .wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item:hover a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-items-list ul.items-list-edit li.item-list-item {
|
||||
display: flex;
|
||||
|
@ -125,7 +126,7 @@
|
|||
width: calc(20% - 24px); }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -141,9 +142,10 @@
|
|||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img {
|
||||
display: none; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a, .wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
@media only screen and (max-width: 1600px) {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item,
|
||||
|
@ -166,4 +168,8 @@
|
|||
min-width: calc(100% - 24px);
|
||||
width: calc(100% - 24px); } }
|
||||
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-items-list li.item-list-item a > span,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-items-list li.item-list-item a:hover > span {
|
||||
color: inherit; }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-items-list.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAEA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;8EAC+C;IAC3C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;4EAC6C;IACzC,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;iFAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;uFAAI;QACA,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;oEACqC;IACjC,OAAO,EAAE,CAAC;ICtCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDqCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;4FAAE;QACE,KAAK,EAAE,oCAAmC;QAC1C,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;QAEnB;mGAAK;UACD,WAAW,EAAE,MAAM;UACnB,OAAO,EAAE,KAAK;MAItB;8FAAI;QACA,MAAM,EAAE,IAA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MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QAnC/C;4FAAkB;UAoCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAxC/C;4FAAkB;UAyCV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA7C9C;4FAAkB;UA8CV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAlD9C;4FAAkB;UAmDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
||||
"sources": ["../../views/gutenberg-blocks/tainacan-blocks/items-list/style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-items-list.css"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
font-size: 0.875em; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button {
|
||||
height: auto !important;
|
||||
min-height: 1.75em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: none;
|
||||
|
@ -41,11 +42,13 @@
|
|||
border-radius: 0 !important;
|
||||
background: white;
|
||||
padding: 4px 1em;
|
||||
font-size: 1em; }
|
||||
font-size: 1em;
|
||||
line-height: 1.75em; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button .icon {
|
||||
height: 1.75em; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button .icon svg {
|
||||
transform: scale(1);
|
||||
height: 100%;
|
||||
fill: var(--tainacan-block-primary, #298596); }
|
||||
@media only screen and (max-width: 768px) {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|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IAG1D,yGAAoC;MAChC,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,KAAK;MAEZ,4GAAG;QACC,MAAM,EAAE,MAAM;QACd,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE,QAAQ;QACvB,KAAK,EAAE,OAAO;QACd,kHAAQ;UACJ,eAAe,EAAE,IAAI;MAG7B,oHAAW;QACP,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,GAAG;IAItB,0CAA2C;MACvC,yGAAoC;QAChC,aAAa,EAAE,GAAG",
|
||||
"sources": ["../../views/gutenberg-blocks/tainacan-blocks/search-bar/style.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-search-bar.css"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
width: 185px; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
|
@ -43,9 +43,10 @@
|
|||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item a.term-without-name span,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item a.term-without-name span {
|
||||
display: none; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item:hover a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item a, .wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item:hover a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit li.term-list-item {
|
||||
display: flex;
|
||||
|
@ -106,7 +107,7 @@
|
|||
width: calc(20% - 24px); }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -122,9 +123,10 @@
|
|||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a.term-without-image img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a.term-without-image img {
|
||||
display: none; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item:hover a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a, .wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item:hover a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item:hover a {
|
||||
color: var(--tainacan-block-gray5, #454647);
|
||||
color: inherit;
|
||||
text-decoration: none; }
|
||||
@media only screen and (max-width: 1600px) {
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item,
|
||||
|
@ -147,4 +149,8 @@
|
|||
min-width: calc(100% - 24px);
|
||||
width: calc(100% - 24px); } }
|
||||
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-terms-list li.term-list-item a > span,
|
||||
.block-editor-block-list__block:not(.has-text-color) > .wp-block-tainacan-terms-list li.term-list-item a:hover > span {
|
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IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;8FAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAGtB;mHAAyB;QACrB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QAnC/C;4FAAkB;UAoCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAxC/C;4FAAkB;UAyCV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA7C9C;4FAAkB;UA8CV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAlD9C;4FAAkB;UAmDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
||||
"sources": ["../../views/gutenberg-blocks/tainacan-blocks/terms-list/style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-terms-list.css"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/carousel-collections-list",
|
||||
"title": "Tainacan Collections Carousel",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "collections", "carousel", "slider" ],
|
||||
"description": "List collections on a Carousel, displaying either its thumbnail or a preview of its items.",
|
||||
|
@ -11,6 +12,12 @@
|
|||
"multiple": true,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { RangeControl, Spinner, Button, BaseControl, ToggleControl, SelectControl, Placeholder, IconButton, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
const { __ } = wp.i18n;
|
||||
|
||||
|
@ -31,6 +31,9 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
|
|||
showCollectionThumbnail
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
console.log(blockProps)
|
||||
// Obtains block's client id to render it on save function
|
||||
setAttributes({ blockId: clientId });
|
||||
|
||||
|
@ -189,7 +192,7 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/carousel-collections-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
{ collections.length ?
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function ({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
|
@ -14,9 +16,12 @@ export default function ({ attributes, className }) {
|
|||
hideName,
|
||||
showCollectionThumbnail
|
||||
} = attributes;
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="carousel-collections-list"
|
||||
className={ className }
|
||||
selected-collections={ JSON.stringify(selectedCollections.map((collection) => { return collection.id })) }
|
||||
arrows-position={ arrowsPosition }
|
||||
auto-play={ '' + autoPlay }
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -151,7 +151,9 @@
|
|||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
a,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -191,7 +193,7 @@
|
|||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, $gray4);
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px;
|
||||
|
@ -279,7 +281,7 @@
|
|||
li.collection-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px 32px 16px 0px;
|
||||
margin: 8px 32px 8px 0px;
|
||||
width: calc(16.666% - 32px);
|
||||
min-width: calc(16.666% - 32px);
|
||||
scroll-snap-align: start;
|
||||
|
@ -292,7 +294,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
}
|
||||
|
@ -306,7 +308,7 @@
|
|||
}
|
||||
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -575,5 +577,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-carousel-collections-list {
|
||||
.swiper-container,
|
||||
li.collection-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ export default (element) => {
|
|||
showCollectionThumbnail: false,
|
||||
tainacanApiRoot: '',
|
||||
tainacanBaseUrl: '',
|
||||
className: ''
|
||||
className: '',
|
||||
style: ''
|
||||
},
|
||||
render(h){
|
||||
return h(CarouselCollectionsListTheme, {
|
||||
|
@ -59,6 +60,7 @@ export default (element) => {
|
|||
tainacanApiRoot: this.tainacanApiRoot,
|
||||
tainacanBaseUrl: this.tainacanBaseUrl,
|
||||
className: this.className,
|
||||
style: this.style
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -77,6 +79,7 @@ export default (element) => {
|
|||
this.showCollectionThumbnail = this.$el.attributes['show-collection-thumbnail'] != undefined ? this.$el.attributes['show-collection-thumbnail'].value == 'true' : false;
|
||||
this.tainacanApiRoot = this.$el.attributes['tainacan-api-root'] != undefined ? this.$el.attributes['tainacan-api-root'].value : undefined;
|
||||
this.tainacanBaseUrl = this.$el.attributes['tainacan-base-url'] != undefined ? this.$el.attributes['tainacan-base-url'].value : undefined;
|
||||
this.style = this.$el.attributes.style != undefined ? this.$el.attributes.style.value : undefined;
|
||||
},
|
||||
methods: {
|
||||
__(text, domain) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div :class="className + ' has-mounted'">
|
||||
<div
|
||||
:style="style"
|
||||
:class="className + ' has-mounted'">
|
||||
<div v-if="!isLoading">
|
||||
<div
|
||||
:class="'tainacan-carousel ' + (arrowsPosition ? ' has-arrows-' + arrowsPosition : '') + (largeArrows ? ' has-large-arrows' : '') "
|
||||
|
@ -200,7 +202,8 @@ export default {
|
|||
showCollectionThumbnail: Boolean,
|
||||
tainacanApiRoot: String,
|
||||
tainacanBaseUrl: String,
|
||||
className: String
|
||||
className: String,
|
||||
style: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/carousel-items-list",
|
||||
"title": "Tainacan Collection's Items Carousel",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "items", "carousel", "slider" ],
|
||||
"description": "List items on a Carousel, using search or item selection.",
|
||||
|
@ -119,6 +120,12 @@
|
|||
"multiple": true,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "carousel-items-list",
|
||||
|
|
|
@ -47,7 +47,8 @@ export default class CarouselItemsModal extends React.Component {
|
|||
if (this.props.existingCollectionId) {
|
||||
this.fetchCollection(this.props.existingCollectionId);
|
||||
this.setState({
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true&status=publish' : '/items/?iframemode=true&status=publish') });
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true&status=publish' : '/items/?iframemode=true&status=publish')
|
||||
});
|
||||
} else {
|
||||
this.setState({ collectionPage: 1 });
|
||||
this.fetchModalCollections();
|
|
@ -2,9 +2,9 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { RangeControl, Spinner, Button, ToggleControl, SelectControl, Placeholder, IconButton, ColorPicker, ColorPalette, BaseControl, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import CarouselItemsModal from './carousel-items-modal.js';
|
||||
import CarouselItemsModal from './dynamic-and-carousel-items-modal.js';
|
||||
import tainacan from '../../js/axios.js';
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
|
@ -12,7 +12,6 @@ import { ThumbnailHelperFunctions } from '../../../admin/js/utilities.js';
|
|||
import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js';
|
||||
import 'swiper/css/swiper.min.css';
|
||||
|
||||
|
||||
export default function({ attributes, setAttributes, className, isSelected, clientId }){
|
||||
let {
|
||||
items,
|
||||
|
@ -41,6 +40,9 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
collectionTextColor
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
// Obtains block's client id to render it on save function
|
||||
setAttributes({ blockId: clientId });
|
||||
const thumbHelper = ThumbnailHelperFunctions();
|
||||
|
@ -247,7 +249,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/carousel-items-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
{ items.length ?
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function ({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
|
@ -20,10 +22,12 @@ export default function ({ attributes, className }) {
|
|||
collectionBackgroundColor,
|
||||
collectionTextColor
|
||||
} = attributes;
|
||||
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="carousel-items-list"
|
||||
className={ className }
|
||||
search-url={ searchURL }
|
||||
selected-items={ JSON.stringify(selectedItems) }
|
||||
arrows-position={ arrowsPosition }
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -163,7 +163,9 @@
|
|||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
a,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -173,7 +175,8 @@
|
|||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, $gray4);
|
||||
color: inherit;
|
||||
opacity: 0.5;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px;
|
||||
|
@ -257,14 +260,14 @@
|
|||
li.item-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px;
|
||||
margin: 8px 16px;
|
||||
width: calc(14.285% - 32px);
|
||||
min-width: calc(14.285% - 32px);
|
||||
scroll-snap-align: start;
|
||||
scroll-margin: 0 16px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
}
|
||||
|
@ -277,7 +280,7 @@
|
|||
}
|
||||
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -528,5 +531,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-carousel-items-list {
|
||||
.swiper-container,
|
||||
li.item-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,8 @@ export default (element) => {
|
|||
collectionTextColor: '#ffffff',
|
||||
tainacanApiRoot: '',
|
||||
tainacanBaseUrl: '',
|
||||
className: ''
|
||||
className: '',
|
||||
style: ''
|
||||
},
|
||||
render(h){
|
||||
return h(CarouselItemsListTheme, {
|
||||
|
@ -70,7 +71,8 @@ export default (element) => {
|
|||
collectionTextColor: this.collectionTextColor,
|
||||
tainacanApiRoot: this.tainacanApiRoot,
|
||||
tainacanBaseUrl: this.tainacanBaseUrl,
|
||||
className: this.className
|
||||
className: this.className,
|
||||
style: this.style
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -95,6 +97,7 @@ export default (element) => {
|
|||
this.collectionTextColor = this.$el.attributes['collection-text-color'] != undefined ? this.$el.attributes['collection-text-color'].value : undefined;
|
||||
this.tainacanApiRoot = this.$el.attributes['tainacan-api-root'] != undefined ? this.$el.attributes['tainacan-api-root'].value : undefined;
|
||||
this.tainacanBaseUrl = this.$el.attributes['tainacan-base-url'] != undefined ? this.$el.attributes['tainacan-base-url'].value : undefined;
|
||||
this.style = this.$el.attributes.style != undefined ? this.$el.attributes.style.value : undefined;
|
||||
},
|
||||
methods: {
|
||||
__(text, domain) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div :class="className + ' has-mounted'">
|
||||
<div
|
||||
:style="style"
|
||||
:class="className + ' has-mounted'">
|
||||
<div v-if="showCollectionHeader">
|
||||
<div
|
||||
v-if="isLoadingCollection"
|
||||
|
@ -76,9 +78,6 @@
|
|||
:alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.title ? item.title : $root.__( 'Thumbnail', 'tainacan' ))"
|
||||
:transition-duration="500" />
|
||||
<span v-if="!hideTitle">{{ item.title ? item.title : '' }}</span>
|
||||
<div
|
||||
v-if="maxItemsPerScreen <= 4"
|
||||
class="swiper-lazy-preloader swiper-lazy-preloader-white"/>
|
||||
</a>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
|
@ -209,7 +208,8 @@ export default {
|
|||
collectionTextColor: String,
|
||||
tainacanApiRoot: String,
|
||||
tainacanBaseUrl: String,
|
||||
className: String
|
||||
className: String,
|
||||
style: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -224,7 +224,6 @@ export default {
|
|||
paged: undefined,
|
||||
totalItems: 0,
|
||||
swiperOptions: {
|
||||
lazy: this.maxItemsPerScreen <= 4,
|
||||
watchOverflow: true,
|
||||
mousewheel: true,
|
||||
observer: true,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/carousel-terms-list",
|
||||
"title": "Tainacan Terms Carousel",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "carousel", "slider", "taxonomy" ],
|
||||
"description": "List terms on a Carousel, showing their thumbnails or a preview of items.",
|
||||
|
@ -103,6 +104,12 @@
|
|||
"multiple": true,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "carousel-terms-list",
|
||||
|
|
|
@ -2,7 +2,7 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { RangeControl, Spinner, Button, BaseControl, ToggleControl, SelectControl, Placeholder, IconButton, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import TermsModal from '../terms-list/terms-modal.js';
|
||||
import tainacan from '../../js/axios.js';
|
||||
|
@ -31,6 +31,9 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
taxonomyId
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
// Obtains block's client id to render it on save function
|
||||
setAttributes({ blockId: clientId });
|
||||
|
||||
|
@ -175,7 +178,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/carousel-terms-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
{ terms.length ?
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
|
@ -14,9 +16,12 @@ export default function({ attributes, className }) {
|
|||
showTermThumbnail,
|
||||
taxonomyId
|
||||
} = attributes;
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="carousel-terms-list"
|
||||
className={ className }
|
||||
selected-terms={ JSON.stringify(selectedTerms.map((term) => { return term.id; })) }
|
||||
arrows-position={ arrowsPosition }
|
||||
auto-play={ '' + autoPlay }
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 8px 12px;
|
||||
|
@ -151,7 +151,9 @@
|
|||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
a,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -191,7 +193,7 @@
|
|||
width: 100%;
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
color: var(--tainacan-block-gray4, $gray4);
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 8px 2px 2px 2px;
|
||||
|
@ -279,7 +281,7 @@
|
|||
li.term-list-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 16px 32px 16px 0px;
|
||||
margin: 8px 32px 8px 0px;
|
||||
width: calc(16.666% - 32px);
|
||||
min-width: calc(16.666% - 32px);
|
||||
scroll-snap-align: start;
|
||||
|
@ -292,7 +294,7 @@
|
|||
}
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
}
|
||||
|
@ -306,7 +308,7 @@
|
|||
}
|
||||
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -439,7 +441,6 @@
|
|||
min-width: calc(100% - 32px);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1452px) {
|
||||
|
||||
ul.terms-list-edit li.terms-list-item {
|
||||
|
@ -574,5 +575,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-carousel-terms-list {
|
||||
.swiper-container,
|
||||
li.term-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ export default (element) => {
|
|||
tainacanApiRoot: '',
|
||||
tainacanBaseUrl: '',
|
||||
className: '',
|
||||
taxonomyId: ''
|
||||
taxonomyId: '',
|
||||
style: ''
|
||||
},
|
||||
render(h){
|
||||
return h(CarouselTermsListTheme, {
|
||||
|
@ -58,7 +59,8 @@ export default (element) => {
|
|||
tainacanApiRoot: this.tainacanApiRoot,
|
||||
tainacanBaseUrl: this.tainacanBaseUrl,
|
||||
className: this.className,
|
||||
taxonomyId: this.taxonomyId
|
||||
taxonomyId: this.taxonomyId,
|
||||
style: this.style
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -77,6 +79,7 @@ export default (element) => {
|
|||
this.showTermThumbnail = this.$el.attributes['show-term-thumbnail'] != undefined ? this.$el.attributes['show-term-thumbnail'].value == 'true' : false;
|
||||
this.tainacanApiRoot = this.$el.attributes['tainacan-api-root'] != undefined ? this.$el.attributes['tainacan-api-root'].value : undefined;
|
||||
this.tainacanBaseUrl = this.$el.attributes['tainacan-base-url'] != undefined ? this.$el.attributes['tainacan-base-url'].value : undefined;
|
||||
this.style = this.$el.attributes.style != undefined ? this.$el.attributes.style.value : undefined;
|
||||
},
|
||||
methods: {
|
||||
__(text, domain) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div :class="className + ' has-mounted'">
|
||||
<div
|
||||
:style="style"
|
||||
:class="className + ' has-mounted'">
|
||||
<div v-if="!isLoading">
|
||||
<div
|
||||
:class="'tainacan-carousel ' + (arrowsPosition ? ' has-arrows-' + arrowsPosition : '') + (largeArrows ? ' has-large-arrows' : '')"
|
||||
|
@ -175,7 +177,8 @@ export default {
|
|||
tainacanApiRoot: String,
|
||||
tainacanBaseUrl: String,
|
||||
className: String,
|
||||
taxonomyId: String
|
||||
taxonomyId: String,
|
||||
style: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/collections-list",
|
||||
"title": "Tainacan Collections List",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "Tainacan", "collections", "repository", "tainacan" ],
|
||||
"description": "Expose collections from your Tainacan repository",
|
||||
|
@ -86,6 +87,12 @@
|
|||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "collections-list",
|
||||
|
|
|
@ -2,7 +2,7 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { RangeControl, IconButton, Button, ToggleControl, Placeholder, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js';
|
||||
import CollectionsModal from './collections-modal.js';
|
||||
|
@ -19,6 +19,9 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
gridMargin
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
function prepareCollection(collection) {
|
||||
return (
|
||||
<li
|
||||
|
@ -131,7 +134,7 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/collections-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const { content } = attributes;
|
||||
return <div data-module="collections-list" className={ className }>{ content }</div>
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
|
||||
return <div { ...blockProps } data-module="collections-list">{ content }</div>
|
||||
};
|
|
@ -54,7 +54,7 @@
|
|||
width: 185px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
|
@ -72,8 +72,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +148,7 @@
|
|||
width: calc(20% - 24px);
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -168,8 +169,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -195,3 +197,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-collections-list {
|
||||
li.collection-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/dynamic-items-list",
|
||||
"title": "Tainacan Collection's Items List",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "items", "search", "collection" ],
|
||||
"description": "Dynamically list items from a Tainacan items search",
|
||||
|
@ -84,6 +85,14 @@
|
|||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"selectedItems": {
|
||||
"type": "Array",
|
||||
"default": []
|
||||
},
|
||||
"loadStrategy": {
|
||||
"type": "String",
|
||||
"value": "search"
|
||||
},
|
||||
"order": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
|
@ -141,6 +150,12 @@
|
|||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "dynamic-items-list",
|
||||
|
|
|
@ -1,4 +1,206 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default [
|
||||
/* Deprecated when new selection strategy was added */
|
||||
{
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "Array",
|
||||
"source": "children",
|
||||
"selector": "div"
|
||||
},
|
||||
"collectionId": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"items": {
|
||||
"type": "Array",
|
||||
"default": []
|
||||
},
|
||||
"showImage": {
|
||||
"type": "Boolean",
|
||||
"default": true
|
||||
},
|
||||
"showName": {
|
||||
"type": "Boolean",
|
||||
"default": true
|
||||
},
|
||||
"layout": {
|
||||
"type": "String",
|
||||
"default": "grid"
|
||||
},
|
||||
"isModalOpen": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"gridMargin": {
|
||||
"type": "Number",
|
||||
"default": 0
|
||||
},
|
||||
"searchURL": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"itemsRequestSource": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"maxItemsNumber": {
|
||||
"type": "Number",
|
||||
"value": 12
|
||||
},
|
||||
"isLoading": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"isLoadingCollection": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"showSearchBar": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"showCollectionHeader": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"showCollectionLabel": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"collection": {
|
||||
"type": "Object",
|
||||
"value": {}
|
||||
},
|
||||
"searchString": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"order": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"blockId": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"collectionBackgroundColor": {
|
||||
"type": "String",
|
||||
"default": "#454647"
|
||||
},
|
||||
"collectionTextColor": {
|
||||
"type": "String",
|
||||
"default": "#ffffff"
|
||||
},
|
||||
"mosaicHeight": {
|
||||
"type": "Number",
|
||||
"value": 280
|
||||
},
|
||||
"mosaicGridColumns": {
|
||||
"type": "Number",
|
||||
"value": 3
|
||||
},
|
||||
"mosaicGridRows": {
|
||||
"type": "Number",
|
||||
"value": 3
|
||||
},
|
||||
"sampleBackgroundImage": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"mosaicItemFocalPoint": {
|
||||
"type": "Object",
|
||||
"default": {
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
}
|
||||
},
|
||||
"mosaicDensity": {
|
||||
"type": "Number",
|
||||
"default": 5
|
||||
},
|
||||
"maxColumnsCount": {
|
||||
"type": "Number",
|
||||
"default": 4
|
||||
},
|
||||
"cropImagesToSquare": {
|
||||
"type": "Boolean",
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"align": ["full", "wide"],
|
||||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
save: function({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
blockId,
|
||||
collectionId,
|
||||
showImage,
|
||||
showName,
|
||||
layout,
|
||||
gridMargin,
|
||||
searchURL,
|
||||
maxItemsNumber,
|
||||
order,
|
||||
showSearchBar,
|
||||
showCollectionHeader,
|
||||
showCollectionLabel,
|
||||
collectionBackgroundColor,
|
||||
collectionTextColor,
|
||||
mosaicHeight,
|
||||
mosaicGridRows,
|
||||
mosaicGridColumns,
|
||||
mosaicItemFocalPoint,
|
||||
mosaicDensity,
|
||||
maxColumnsCount,
|
||||
cropImagesToSquare
|
||||
} = attributes;
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="dynamic-items-list"
|
||||
search-url={ searchURL }
|
||||
collection-id={ collectionId }
|
||||
show-image={ '' + showImage }
|
||||
show-name={ '' + showName }
|
||||
show-search-bar={ '' + showSearchBar }
|
||||
show-collection-header={ '' + showCollectionHeader }
|
||||
show-collection-label={ '' + showCollectionLabel }
|
||||
crop-images-to-square={ '' + cropImagesToSquare }
|
||||
layout={ layout }
|
||||
mosaic-height={ mosaicHeight }
|
||||
mosaic-density={ mosaicDensity }
|
||||
mosaic-grid-rows={ mosaicGridRows }
|
||||
mosaic-grid-columns={ mosaicGridColumns }
|
||||
mosaic-item-focal-point-x={ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) }
|
||||
mosaic-item-focal-point-y={ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) }
|
||||
max-columns-count={ maxColumnsCount }
|
||||
collection-background-color={ collectionBackgroundColor }
|
||||
collection-text-color={ collectionTextColor }
|
||||
grid-margin={ gridMargin }
|
||||
max-items-number={ maxItemsNumber }
|
||||
order={ order }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
id={ 'wp-block-tainacan-dynamic-items-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
}
|
||||
},
|
||||
/* Deprecated on Tainacan 0.18.4, due to the new block.json strategy */
|
||||
{
|
||||
attributes: {
|
||||
|
|
|
@ -1,293 +0,0 @@
|
|||
import tainacan from '../../js/axios.js';
|
||||
import axios from 'axios';
|
||||
|
||||
const { __ } = wp.i18n;
|
||||
|
||||
const { TextControl, Button, Modal, RadioControl, Spinner } = wp.components;
|
||||
|
||||
export default class DynamicItemsModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
// Initialize state
|
||||
this.state = {
|
||||
collectionsPerPage: 24,
|
||||
collectionId: undefined,
|
||||
collectionName: '',
|
||||
isLoadingCollections: false,
|
||||
modalCollections: [],
|
||||
totalModalCollections: 0,
|
||||
collectionPage: 1,
|
||||
temporaryCollectionId: '',
|
||||
searchCollectionName: '',
|
||||
collections: [],
|
||||
collectionsRequestSource: undefined,
|
||||
searchURL: '',
|
||||
};
|
||||
|
||||
// Bind events
|
||||
this.resetCollections = this.resetCollections.bind(this);
|
||||
this.selectCollection = this.selectCollection.bind(this);
|
||||
this.fetchCollections = this.fetchCollections.bind(this);
|
||||
this.fetchModalCollections = this.fetchModalCollections.bind(this);
|
||||
this.fetchCollection = this.fetchCollection.bind(this);
|
||||
this.applySelectedSearchURL = this.applySelectedSearchURL.bind(this);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
||||
this.setState({
|
||||
collectionId: this.props.existingCollectionId
|
||||
});
|
||||
|
||||
if (this.props.existingCollectionId) {
|
||||
this.fetchCollection(this.props.existingCollectionId);
|
||||
this.setState({ searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?readmode=true&iframemode=true&status=publish' });
|
||||
} else {
|
||||
this.setState({ collectionPage: 1 });
|
||||
this.fetchModalCollections();
|
||||
}
|
||||
}
|
||||
|
||||
// COLLECTIONS RELATED --------------------------------------------------
|
||||
fetchModalCollections() {
|
||||
|
||||
let someModalCollections = this.state.modalCollections;
|
||||
if (this.state.collectionPage <= 1)
|
||||
someModalCollections = [];
|
||||
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage + '&paged=' + this.state.collectionPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: true,
|
||||
collectionPage: this.state.collectionPage + 1,
|
||||
modalCollections: someModalCollections
|
||||
});
|
||||
|
||||
tainacan.get(endpoint)
|
||||
.then(response => {
|
||||
|
||||
let otherModalCollections = this.state.modalCollections;
|
||||
for (let collection of response.data) {
|
||||
otherModalCollections.push({
|
||||
name: collection.name,
|
||||
id: collection.id
|
||||
});
|
||||
}
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: false,
|
||||
modalCollections: otherModalCollections,
|
||||
totalModalCollections: response.headers['x-wp-total']
|
||||
});
|
||||
|
||||
return otherModalCollections;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Error trying to fetch collections: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
fetchCollection(collectionId) {
|
||||
tainacan.get('/collections/' + collectionId)
|
||||
.then((response) => {
|
||||
this.setState({ collectionName: response.data.name });
|
||||
}).catch(error => {
|
||||
console.log('Error trying to fetch collection: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
selectCollection(selectedCollectionId) {
|
||||
this.setState({
|
||||
collectionId: selectedCollectionId,
|
||||
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?readmode=true&iframemode=true&status=publish'
|
||||
});
|
||||
|
||||
this.props.onSelectCollection(selectedCollectionId);
|
||||
this.fetchCollection(selectedCollectionId);
|
||||
}
|
||||
|
||||
fetchCollections(name) {
|
||||
|
||||
if (this.state.collectionsRequestSource != undefined)
|
||||
this.state.collectionsRequestSource.cancel('Previous collections search canceled.');
|
||||
|
||||
let aCollectionRequestSource = axios.CancelToken.source();
|
||||
|
||||
this.setState({
|
||||
collectionsRequestSource: aCollectionRequestSource,
|
||||
isLoadingCollections: true,
|
||||
collections: [],
|
||||
items: []
|
||||
});
|
||||
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage;
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
||||
tainacan.get(endpoint, { cancelToken: aCollectionRequestSource.token })
|
||||
.then(response => {
|
||||
let someCollections = response.data.map((collection) => ({ name: collection.name, id: collection.id + '' }));
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: false,
|
||||
collections: someCollections
|
||||
});
|
||||
|
||||
return someCollections;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Error trying to fetch collections: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
applySelectedSearchURL() {
|
||||
this.props.onApplySearchURL(document.getElementById("itemsFrame").contentWindow.location.href);
|
||||
}
|
||||
|
||||
resetCollections() {
|
||||
|
||||
this.setState({
|
||||
collectionId: null,
|
||||
collectionPage: 1,
|
||||
modalCollections: []
|
||||
});
|
||||
this.fetchModalCollections();
|
||||
}
|
||||
|
||||
cancelSelection() {
|
||||
|
||||
this.setState({
|
||||
modalCollections: []
|
||||
});
|
||||
|
||||
this.props.onCancelSelection();
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.state.collectionId ? (
|
||||
// Items modal
|
||||
<Modal
|
||||
className="wp-block-tainacan-modal dynamic-modal"
|
||||
title={__('Configure the items search to be used on block', 'tainacan')}
|
||||
onRequestClose={ () => this.cancelSelection() }
|
||||
shouldCloseOnClickOutside={ false }
|
||||
contentLabel={__('Configure your items search to be shown on block', 'tainacan')}>
|
||||
<iframe
|
||||
id="itemsFrame"
|
||||
src={ this.state.searchURL } />
|
||||
<div className="modal-footer-area">
|
||||
<Button
|
||||
isSecondary
|
||||
onClick={ () => { this.resetCollections() }}>
|
||||
{__('Switch collection', 'tainacan')}
|
||||
</Button>
|
||||
<Button
|
||||
isPrimary
|
||||
onClick={ () => this.applySelectedSearchURL() }>
|
||||
{__('Use this search', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
) : (
|
||||
// Collections modal
|
||||
<Modal
|
||||
className="wp-block-tainacan-modal"
|
||||
title={__('Select a collection to fetch items from', 'tainacan')}
|
||||
onRequestClose={ () => this.cancelSelection() }
|
||||
shouldCloseOnClickOutside={ false }
|
||||
contentLabel={__('Select items', 'tainacan')}>
|
||||
<div>
|
||||
<div className="modal-search-area">
|
||||
<TextControl
|
||||
label={__('Search for a collection', 'tainacan')}
|
||||
value={ this.state.searchCollectionName }
|
||||
onChange={(value) => {
|
||||
this.setState({
|
||||
searchCollectionName: value
|
||||
});
|
||||
_.debounce(this.fetchCollections(value), 300);
|
||||
}}/>
|
||||
</div>
|
||||
{(
|
||||
this.state.searchCollectionName != '' ? (
|
||||
this.state.collections.length > 0 ?
|
||||
(
|
||||
<div>
|
||||
<div className="modal-radio-list">
|
||||
{
|
||||
<RadioControl
|
||||
selected={ this.state.temporaryCollectionId }
|
||||
options={
|
||||
this.state.collections.map((collection) => {
|
||||
return { label: collection.name, value: '' + collection.id }
|
||||
})
|
||||
}
|
||||
onChange={ ( aCollectionId ) => {
|
||||
this.setState({ temporaryCollectionId: aCollectionId });
|
||||
} } />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
) :
|
||||
this.state.isLoadingCollections ? (
|
||||
<Spinner />
|
||||
) :
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Sorry, no collection found.', 'tainacan') }</p>
|
||||
</div>
|
||||
):
|
||||
this.state.modalCollections.length > 0 ?
|
||||
(
|
||||
<div>
|
||||
<div className="modal-radio-list">
|
||||
{
|
||||
<RadioControl
|
||||
selected={ this.state.temporaryCollectionId }
|
||||
options={
|
||||
this.state.modalCollections.map((collection) => {
|
||||
return { label: collection.name, value: '' + collection.id }
|
||||
})
|
||||
}
|
||||
onChange={ ( aCollectionId ) => {
|
||||
this.setState({ temporaryCollectionId: aCollectionId });
|
||||
} } />
|
||||
}
|
||||
</div>
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Showing', 'tainacan') + " " + this.state.modalCollections.length + " " + __('of', 'tainacan') + " " + this.state.totalModalCollections + " " + __('collections', 'tainacan') + "."}</p>
|
||||
{
|
||||
this.state.modalCollections.length < this.state.totalModalCollections ? (
|
||||
<Button
|
||||
isSecondary
|
||||
isSmall
|
||||
onClick={ () => this.fetchModalCollections() }>
|
||||
{__('Load more', 'tainacan')}
|
||||
</Button>
|
||||
) : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
) : this.state.isLoadingCollections ? <Spinner/> :
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Sorry, no collection found.', 'tainacan') }</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="modal-footer-area">
|
||||
<Button
|
||||
isSecondary
|
||||
onClick={ () => { this.cancelSelection() }}>
|
||||
{__('Cancel', 'tainacan')}
|
||||
</Button>
|
||||
<Button
|
||||
isPrimary
|
||||
disabled={ this.state.temporaryCollectionId == undefined || this.state.temporaryCollectionId == null || this.state.temporaryCollectionId == ''}
|
||||
onClick={ () => { this.selectCollection(this.state.temporaryCollectionId); } }>
|
||||
{__('Configure search', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -2,9 +2,9 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { ResizableBox, FocalPointPicker, SelectControl, RangeControl, Spinner, Button, ToggleControl, Placeholder, ColorPicker, ColorPalette, BaseControl, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import DynamicItemsModal from './dynamic-items-modal.js';
|
||||
import DynamicItemsModal from '../carousel-items-list/dynamic-and-carousel-items-modal.js';
|
||||
import tainacan from '../../js/axios.js';
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
|
@ -16,7 +16,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
items,
|
||||
content,
|
||||
collection,
|
||||
collectionId,
|
||||
collectionId,
|
||||
showImage,
|
||||
showName,
|
||||
layout,
|
||||
|
@ -27,7 +27,9 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
maxItemsNumber,
|
||||
order,
|
||||
searchString,
|
||||
selectedItems,
|
||||
isLoading,
|
||||
loadStrategy,
|
||||
showSearchBar,
|
||||
showCollectionHeader,
|
||||
showCollectionLabel,
|
||||
|
@ -44,8 +46,12 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
cropImagesToSquare
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
// Obtains block's client id to render it on save function
|
||||
setAttributes({ blockId: clientId });
|
||||
const thumbHelper = ThumbnailHelperFunctions();
|
||||
|
||||
// Sets some defaults that were not working
|
||||
if (maxColumnsCount === undefined) {
|
||||
|
@ -56,8 +62,10 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
cropImagesToSquare = true;
|
||||
setAttributes({ cropImagesToSquare: cropImagesToSquare });
|
||||
}
|
||||
|
||||
const thumbHelper = ThumbnailHelperFunctions();
|
||||
if (loadStrategy === undefined) {
|
||||
loadStrategy = 'search';
|
||||
setAttributes({ loadStrategy: loadStrategy });
|
||||
}
|
||||
|
||||
function prepareItem(item) {
|
||||
return (
|
||||
|
@ -68,15 +76,26 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
backgroundImage: layout == 'mosaic' ? `url(${ thumbHelper.getSrc(item['thumbnail'], 'medium_large', item['document_mimetype']) })` : 'none',
|
||||
backgroundPosition: layout == 'mosaic' ? `${ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) * 100 }% ${ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) * 100 }%` : 'none'
|
||||
}}
|
||||
>
|
||||
>
|
||||
{ loadStrategy == 'selection' ?
|
||||
( tainacan_blocks.wp_version < '5.4' ?
|
||||
<IconButton
|
||||
onClick={ () => removeItemOfId(item.id) }
|
||||
icon="no-alt"
|
||||
label={__('Remove', 'tainacan')}/>
|
||||
:
|
||||
<Button
|
||||
onClick={ () => removeItemOfId(item.id) }
|
||||
icon="no-alt"
|
||||
label={__('Remove', 'tainacan')}/>
|
||||
)
|
||||
:null
|
||||
}
|
||||
<a
|
||||
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
||||
href={ item.url }
|
||||
onClick={ (event) => event.preventDefault() }
|
||||
target="_blank"
|
||||
style={ {
|
||||
|
||||
} }
|
||||
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
||||
<img
|
||||
src={ thumbHelper.getSrc(item['thumbnail'], ( (layout == 'list' || cropImagesToSquare) ? 'tainacan-medium' : 'tainacan-medium-full'), item['document_mimetype']) }
|
||||
|
@ -107,69 +126,69 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
)
|
||||
}
|
||||
|
||||
function setContent(){
|
||||
function setContent() {
|
||||
isLoading = true;
|
||||
|
||||
if (searchURL) {
|
||||
setAttributes({
|
||||
isLoading: isLoading
|
||||
});
|
||||
|
||||
items = [];
|
||||
isLoading = true;
|
||||
items = [];
|
||||
|
||||
if (loadStrategy == 'parent') {
|
||||
|
||||
if (layout !== 'mosaic') {
|
||||
|
||||
for (let item of selectedItems)
|
||||
items.push(prepareItem(item));
|
||||
|
||||
setAttributes({
|
||||
content: <div></div>,
|
||||
items: items,
|
||||
isLoading: false
|
||||
});
|
||||
|
||||
} else {
|
||||
// Initializes some variables
|
||||
mosaicDensity = mosaicDensity ? mosaicDensity : 5;
|
||||
mosaicGridRows = mosaicGridRows ? mosaicGridRows : 3;
|
||||
mosaicGridColumns = mosaicGridColumns ? mosaicGridColumns : 3;
|
||||
mosaicHeight = mosaicHeight ? mosaicHeight : 280;
|
||||
mosaicItemFocalPoint = mosaicItemFocalPoint ? mosaicItemFocalPoint : { x: 0.5, y: 0.5 };
|
||||
sampleBackgroundImage = response.data.items && response.data.items[0] && response.data.items[0] ? getItemThumbnail(response.data.items[0], 'tainacan-medium') : '';
|
||||
|
||||
const mosaicGroups = mosaicPartition(response.data.items);
|
||||
for (let mosaicGroup of mosaicGroups)
|
||||
items.push(prepareMosaicItem(mosaicGroup, mosaicGroups.length));
|
||||
|
||||
setAttributes({
|
||||
content: <div></div>,
|
||||
items: items,
|
||||
isLoading: false,
|
||||
itemsRequestSource: itemsRequestSource,
|
||||
mosaicDensity: mosaicDensity,
|
||||
mosaicHeight: mosaicHeight,
|
||||
mosaicGridRows: mosaicGridRows,
|
||||
mosaicGridColumns: mosaicGridColumns,
|
||||
mosaicItemFocalPoint: mosaicItemFocalPoint,
|
||||
sampleBackgroundImage: sampleBackgroundImage
|
||||
});
|
||||
}
|
||||
|
||||
} else if (loadStrategy == 'selection') {
|
||||
|
||||
if (itemsRequestSource != undefined && typeof itemsRequestSource == 'function')
|
||||
itemsRequestSource.cancel('Previous items search canceled.');
|
||||
|
||||
itemsRequestSource = axios.CancelToken.source();
|
||||
|
||||
setAttributes({
|
||||
isLoading: isLoading
|
||||
});
|
||||
|
||||
let endpoint = '/collection' + searchURL.split('#')[1].split('/collections')[1];
|
||||
let query = endpoint.split('?')[1];
|
||||
let queryObject = qs.parse(query);
|
||||
|
||||
// Set up max items to be shown
|
||||
if (maxItemsNumber != undefined && maxItemsNumber > 0)
|
||||
queryObject.perpage = maxItemsNumber;
|
||||
else if (queryObject.perpage != undefined && queryObject.perpage > 0)
|
||||
setAttributes({ maxItemsNumber: queryObject.perpage });
|
||||
else {
|
||||
queryObject.perpage = 12;
|
||||
setAttributes({ maxItemsNumber: 12 });
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (order != '' && showSearchBar)
|
||||
queryObject.order = order;
|
||||
else if (queryObject.order != '')
|
||||
setAttributes({ order: queryObject.order });
|
||||
else {
|
||||
queryObject.order = 'asc';
|
||||
setAttributes({ order: 'asc' });
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (searchString != undefined)
|
||||
queryObject.search = searchString;
|
||||
else if (queryObject.search != undefined)
|
||||
setAttributes({ searchString: queryObject.search });
|
||||
else {
|
||||
delete queryObject.search;
|
||||
setAttributes({ searchString: undefined });
|
||||
}
|
||||
|
||||
// Remove unecessary queries
|
||||
delete queryObject.readmode;
|
||||
delete queryObject.iframemode;
|
||||
delete queryObject.admin_view_mode;
|
||||
delete queryObject.fetch_only_meta;
|
||||
|
||||
endpoint = endpoint.split('?')[0] + '?' + qs.stringify(queryObject) + '&fetch_only=title,url,thumbnail';
|
||||
let endpoint = '/collection/' + collectionId + '/items?'+ qs.stringify({ postin: selectedItems, perpage: selectedItems.length }) + '&fetch_only=title,url,thumbnail';
|
||||
|
||||
tainacan.get(endpoint, { cancelToken: itemsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
|
||||
if (layout !== 'mosaic') {
|
||||
|
||||
|
||||
for (let item of response.data.items)
|
||||
items.push(prepareItem(item));
|
||||
|
||||
|
@ -206,7 +225,102 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
sampleBackgroundImage: sampleBackgroundImage
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
|
||||
if (searchURL) {
|
||||
|
||||
if (itemsRequestSource != undefined && typeof itemsRequestSource == 'function')
|
||||
itemsRequestSource.cancel('Previous items search canceled.');
|
||||
|
||||
itemsRequestSource = axios.CancelToken.source();
|
||||
|
||||
let endpoint = '/collection' + searchURL.split('#')[1].split('/collections')[1];
|
||||
let query = endpoint.split('?')[1];
|
||||
let queryObject = qs.parse(query);
|
||||
|
||||
// Set up max items to be shown
|
||||
if (maxItemsNumber != undefined && maxItemsNumber > 0)
|
||||
queryObject.perpage = maxItemsNumber;
|
||||
else if (queryObject.perpage != undefined && queryObject.perpage > 0)
|
||||
setAttributes({ maxItemsNumber: queryObject.perpage });
|
||||
else {
|
||||
queryObject.perpage = 12;
|
||||
setAttributes({ maxItemsNumber: 12 });
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (order != '' && showSearchBar)
|
||||
queryObject.order = order;
|
||||
else if (queryObject.order != '')
|
||||
setAttributes({ order: queryObject.order });
|
||||
else {
|
||||
queryObject.order = 'asc';
|
||||
setAttributes({ order: 'asc' });
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (searchString != undefined)
|
||||
queryObject.search = searchString;
|
||||
else if (queryObject.search != undefined)
|
||||
setAttributes({ searchString: queryObject.search });
|
||||
else {
|
||||
delete queryObject.search;
|
||||
setAttributes({ searchString: undefined });
|
||||
}
|
||||
|
||||
// Remove unecessary queries
|
||||
delete queryObject.readmode;
|
||||
delete queryObject.iframemode;
|
||||
delete queryObject.admin_view_mode;
|
||||
delete queryObject.fetch_only_meta;
|
||||
|
||||
endpoint = endpoint.split('?')[0] + '?' + qs.stringify(queryObject) + '&fetch_only=title,url,thumbnail';
|
||||
|
||||
tainacan.get(endpoint, { cancelToken: itemsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
if (layout !== 'mosaic') {
|
||||
|
||||
for (let item of response.data.items)
|
||||
items.push(prepareItem(item));
|
||||
|
||||
setAttributes({
|
||||
content: <div></div>,
|
||||
items: items,
|
||||
isLoading: false,
|
||||
itemsRequestSource: itemsRequestSource
|
||||
});
|
||||
|
||||
} else {
|
||||
// Initializes some variables
|
||||
mosaicDensity = mosaicDensity ? mosaicDensity : 5;
|
||||
mosaicGridRows = mosaicGridRows ? mosaicGridRows : 3;
|
||||
mosaicGridColumns = mosaicGridColumns ? mosaicGridColumns : 3;
|
||||
mosaicHeight = mosaicHeight ? mosaicHeight : 280;
|
||||
mosaicItemFocalPoint = mosaicItemFocalPoint ? mosaicItemFocalPoint : { x: 0.5, y: 0.5 };
|
||||
sampleBackgroundImage = response.data.items && response.data.items[0] && response.data.items[0] ? getItemThumbnail(response.data.items[0], 'tainacan-medium') : '';
|
||||
|
||||
const mosaicGroups = mosaicPartition(response.data.items);
|
||||
for (let mosaicGroup of mosaicGroups)
|
||||
items.push(prepareMosaicItem(mosaicGroup, mosaicGroups.length));
|
||||
|
||||
setAttributes({
|
||||
content: <div></div>,
|
||||
items: items,
|
||||
isLoading: false,
|
||||
itemsRequestSource: itemsRequestSource,
|
||||
mosaicDensity: mosaicDensity,
|
||||
mosaicHeight: mosaicHeight,
|
||||
mosaicGridRows: mosaicGridRows,
|
||||
mosaicGridColumns: mosaicGridColumns,
|
||||
mosaicItemFocalPoint: mosaicItemFocalPoint,
|
||||
sampleBackgroundImage: sampleBackgroundImage
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,13 +372,46 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
)
|
||||
}
|
||||
|
||||
function openDynamicItemsModal() {
|
||||
function openDynamicItemsModal(aLoadStrategy) {
|
||||
loadStrategy = aLoadStrategy;
|
||||
isModalOpen = true;
|
||||
setAttributes( {
|
||||
isModalOpen: isModalOpen
|
||||
isModalOpen: isModalOpen,
|
||||
loadStrategy: loadStrategy
|
||||
} );
|
||||
}
|
||||
|
||||
function removeItemOfId(itemId) {
|
||||
|
||||
let existingItemIndex = -1;
|
||||
|
||||
let existingSelectedItemIndex = selectedItems.findIndex((existingSelectedItem) => existingSelectedItem == itemId);
|
||||
if (existingSelectedItemIndex >= 0)
|
||||
selectedItems.splice(existingSelectedItemIndex, 1);
|
||||
|
||||
if (layout == 'mosaic') {
|
||||
existingItemIndex = items.findIndex((existingItem) => existingItem.key == itemId);
|
||||
|
||||
setAttributes({
|
||||
selectedItems: selectedItems,
|
||||
content: <div></div>
|
||||
});
|
||||
// In the case of the mosaic layout, we need to re-render as the items array is organized in groups.
|
||||
setContent();
|
||||
} else {
|
||||
existingItemIndex = items.findIndex((existingItem) => existingItem.key == itemId);
|
||||
|
||||
if (existingItemIndex >= 0)
|
||||
items.splice(existingItemIndex, 1);
|
||||
|
||||
setAttributes({
|
||||
selectedItems: selectedItems,
|
||||
items: items,
|
||||
content: <div></div>
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateLayout(newLayout) {
|
||||
layout = newLayout;
|
||||
|
||||
|
@ -344,32 +491,49 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
];
|
||||
|
||||
return content == 'preview' ?
|
||||
<div className={className}>
|
||||
<img
|
||||
width="100%"
|
||||
src={ `${tainacan_blocks.base_url}/assets/images/dynamic-items-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<img
|
||||
width="100%"
|
||||
src={ `${tainacan_blocks.base_url}/assets/images/dynamic-items-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
{ items.length ?
|
||||
<BlockControls>
|
||||
{ TainacanBlocksCompatToolbar({ controls: layoutControls }) }
|
||||
{ items.length ?
|
||||
TainacanBlocksCompatToolbar({
|
||||
label: __('Configure search', 'tainacan'),
|
||||
icon: <svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 -2 24 24"
|
||||
height="24px"
|
||||
width="24px">
|
||||
<path d="M14,2V4H7v7.24A5.33,5.33,0,0,0,5.5,11a4.07,4.07,0,0,0-.5,0V4A2,2,0,0,1,7,2Zm7,10v8a2,2,0,0,1-2,2H12l1-1-2.41-2.41A5.56,5.56,0,0,0,11,16.53a5.48,5.48,0,0,0-2-4.24V8a2,2,0,0,1,2-2h4Zm-2.52,0L14,7.5V12ZM11,21l-1,1L8.86,20.89,8,20H8l-.57-.57A3.42,3.42,0,0,1,5.5,20a3.5,3.5,0,0,1-.5-7,2.74,2.74,0,0,1,.5,0,3.41,3.41,0,0,1,1.5.34,3.5,3.5,0,0,1,2,3.16,3.42,3.42,0,0,1-.58,1.92L9,19H9l.85.85Zm-4-4.5A1.5,1.5,0,0,0,5.5,15a1.39,1.39,0,0,0-.5.09A1.5,1.5,0,0,0,5.5,18a1.48,1.48,0,0,0,1.42-1A1.5,1.5,0,0,0,7,16.53Z"/>
|
||||
</svg>,
|
||||
onClick: openDynamicItemsModal
|
||||
})
|
||||
: null }
|
||||
{ loadStrategy != 'parent' ?
|
||||
(
|
||||
loadStrategy == 'selection' ?
|
||||
TainacanBlocksCompatToolbar({
|
||||
label: __('Add more items', 'tainacan'),
|
||||
icon: <svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 -2 24 24"
|
||||
height="24px"
|
||||
width="24px">
|
||||
<path d="M14,2V4H7v7.24A5.33,5.33,0,0,0,5.5,11a4.07,4.07,0,0,0-.5,0V4A2,2,0,0,1,7,2Zm7,10v8a2,2,0,0,1-2,2H12l1-1-2.41-2.41A5.56,5.56,0,0,0,11,16.53a5.48,5.48,0,0,0-2-4.24V8a2,2,0,0,1,2-2h4Zm-2.52,0L14,7.5V12ZM11,21l-1,1L8.86,20.89,8,20H8l-.57-.57A3.42,3.42,0,0,1,5.5,20a3.5,3.5,0,0,1-.5-7,2.74,2.74,0,0,1,.5,0,3.41,3.41,0,0,1,1.5.34,3.5,3.5,0,0,1,2,3.16,3.42,3.42,0,0,1-.58,1.92L9,19H9l.85.85Zm-4-4.5A1.5,1.5,0,0,0,5.5,15a1.39,1.39,0,0,0-.5.09A1.5,1.5,0,0,0,5.5,18a1.48,1.48,0,0,0,1.42-1A1.5,1.5,0,0,0,7,16.53Z"/>
|
||||
</svg>,
|
||||
onClick: openDynamicItemsModal,
|
||||
onClickParams: 'selection'
|
||||
})
|
||||
:
|
||||
TainacanBlocksCompatToolbar({
|
||||
label: __('Configure a search', 'tainacan'),
|
||||
icon: <svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 -2 24 24"
|
||||
height="24px"
|
||||
width="24px">
|
||||
<path d="M14,2V4H7v7.24A5.33,5.33,0,0,0,5.5,11a4.07,4.07,0,0,0-.5,0V4A2,2,0,0,1,7,2Zm7,10v8a2,2,0,0,1-2,2H12l1-1-2.41-2.41A5.56,5.56,0,0,0,11,16.53a5.48,5.48,0,0,0-2-4.24V8a2,2,0,0,1,2-2h4Zm-2.52,0L14,7.5V12ZM11,21l-1,1L8.86,20.89,8,20H8l-.57-.57A3.42,3.42,0,0,1,5.5,20a3.5,3.5,0,0,1-.5-7,2.74,2.74,0,0,1,.5,0,3.41,3.41,0,0,1,1.5.34,3.5,3.5,0,0,1,2,3.16,3.42,3.42,0,0,1-.58,1.92L9,19H9l.85.85Zm-4-4.5A1.5,1.5,0,0,0,5.5,15a1.39,1.39,0,0,0-.5.09A1.5,1.5,0,0,0,5.5,18a1.48,1.48,0,0,0,1.42-1A1.5,1.5,0,0,0,7,16.53Z"/>
|
||||
</svg>,
|
||||
onClick: openDynamicItemsModal,
|
||||
onClickParams: 'search'
|
||||
})
|
||||
) : null
|
||||
}
|
||||
</BlockControls>
|
||||
</div>
|
||||
: null }
|
||||
|
||||
<div>
|
||||
<InspectorControls>
|
||||
|
@ -432,39 +596,43 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
: null
|
||||
}
|
||||
</PanelBody>
|
||||
<PanelBody
|
||||
title={__('Search bar', 'tainacan')}
|
||||
initialOpen={ true }
|
||||
>
|
||||
<ToggleControl
|
||||
label={__('Display bar', 'tainacan')}
|
||||
help={ showSearchBar ? __('Toggle to show search bar on block', 'tainacan') : __('Do not show search bar', 'tainacan')}
|
||||
checked={ showSearchBar }
|
||||
onChange={ ( isChecked ) => {
|
||||
showSearchBar = isChecked;
|
||||
setAttributes({ showSearchBar: showSearchBar });
|
||||
}
|
||||
}
|
||||
/>
|
||||
</PanelBody>
|
||||
{ loadStrategy == 'search' ?
|
||||
<PanelBody
|
||||
title={__('Search bar', 'tainacan')}
|
||||
initialOpen={ true }
|
||||
>
|
||||
<ToggleControl
|
||||
label={__('Display bar', 'tainacan')}
|
||||
help={ showSearchBar ? __('Toggle to show search bar on block', 'tainacan') : __('Do not show search bar', 'tainacan')}
|
||||
checked={ showSearchBar }
|
||||
onChange={ ( isChecked ) => {
|
||||
showSearchBar = isChecked;
|
||||
setAttributes({ showSearchBar: showSearchBar });
|
||||
}
|
||||
}
|
||||
/>
|
||||
</PanelBody>
|
||||
: null }
|
||||
<PanelBody
|
||||
title={__('Items', 'tainacan')}
|
||||
initialOpen={ true }
|
||||
>
|
||||
<div>
|
||||
<RangeControl
|
||||
label={__('Maximum number of items', 'tainacan')}
|
||||
value={ maxItemsNumber ? maxItemsNumber : 12 }
|
||||
onChange={ ( aMaxItemsNumber ) => {
|
||||
maxItemsNumber = aMaxItemsNumber;
|
||||
setAttributes( { maxItemsNumber: aMaxItemsNumber } )
|
||||
setContent();
|
||||
}}
|
||||
min={ 1 }
|
||||
max={ 96 }
|
||||
/>
|
||||
{ loadStrategy == 'search' ?
|
||||
<div>
|
||||
<RangeControl
|
||||
label={__('Maximum number of items', 'tainacan')}
|
||||
value={ maxItemsNumber ? maxItemsNumber : 12 }
|
||||
onChange={ ( aMaxItemsNumber ) => {
|
||||
maxItemsNumber = aMaxItemsNumber;
|
||||
setAttributes( { maxItemsNumber: aMaxItemsNumber } )
|
||||
setContent();
|
||||
}}
|
||||
min={ 1 }
|
||||
max={ 96 }
|
||||
/>
|
||||
<hr></hr>
|
||||
</div>
|
||||
<hr></hr>
|
||||
: null }
|
||||
<div>
|
||||
{ layout == 'list' ?
|
||||
<div style={{ marginTop: '16px'}}>
|
||||
|
@ -591,6 +759,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
{ label: '4 x 3', value: '4x3' },
|
||||
{ label: '4 x 5', value: '4x5' },
|
||||
{ label: '5 x 4', value: '5x4' },
|
||||
{ label: '6 x 5', value: '6x5' },
|
||||
] }
|
||||
onChange={ ( aGrid ) => {
|
||||
mosaicGridRows = aGrid.split('x')[0];
|
||||
|
@ -625,21 +794,41 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
<div>
|
||||
{ isModalOpen ?
|
||||
<DynamicItemsModal
|
||||
loadStrategy={ loadStrategy }
|
||||
existingCollectionId={ collectionId }
|
||||
existingSearchURL={ searchURL }
|
||||
onSelectCollection={ (selectedCollectionId) => {
|
||||
if (collectionId != selectedCollectionId) {
|
||||
items = [];
|
||||
selectedItems = [];
|
||||
}
|
||||
collectionId = selectedCollectionId;
|
||||
setAttributes({ collectionId: collectionId });
|
||||
setAttributes({
|
||||
collectionId: collectionId,
|
||||
items: items,
|
||||
selectedItems: selectedItems
|
||||
});
|
||||
fetchCollectionForHeader();
|
||||
}}
|
||||
onApplySearchURL={ (aSearchURL) =>{
|
||||
searchURL = aSearchURL
|
||||
searchURL = aSearchURL;
|
||||
loadStrategy = 'search';
|
||||
setAttributes({
|
||||
searchURL: searchURL,
|
||||
isModalOpen: false
|
||||
});
|
||||
setContent();
|
||||
}}
|
||||
onApplySelectedItems={ (aSelectionOfItems) => {
|
||||
selectedItems = selectedItems.concat(aSelectionOfItems);
|
||||
loadStrategy = 'selection';
|
||||
setAttributes({
|
||||
selectedItems: selectedItems,
|
||||
loadStrategy: loadStrategy,
|
||||
isModalOpen: false
|
||||
});
|
||||
setContent();
|
||||
}}
|
||||
onCancelSelection={ () => setAttributes({ isModalOpen: false }) }/>
|
||||
: null
|
||||
}
|
||||
|
@ -806,12 +995,25 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
</svg>
|
||||
{__('Dynamically list items from a Tainacan items search', 'tainacan')}
|
||||
</p>
|
||||
<Button
|
||||
isPrimary
|
||||
type="button"
|
||||
onClick={ () => openDynamicItemsModal() }>
|
||||
{__('Configure search', 'tainacan')}
|
||||
</Button>
|
||||
{
|
||||
loadStrategy != 'parent' ?
|
||||
<div>
|
||||
<Button
|
||||
isPrimary
|
||||
type="button"
|
||||
onClick={ () => openDynamicItemsModal('selection') }>
|
||||
{__('Select Items', 'tainacan')}
|
||||
</Button>
|
||||
<p style={{ margin: '0 12px' }}>{__('or', 'tainacan')}</p>
|
||||
<Button
|
||||
isPrimary
|
||||
type="button"
|
||||
onClick={ () => openDynamicItemsModal('search') }>
|
||||
{__('Configure a search', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
: null
|
||||
}
|
||||
</Placeholder>
|
||||
) : null
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
|
@ -24,10 +26,12 @@ export default function({ attributes, className }) {
|
|||
cropImagesToSquare
|
||||
} = attributes;
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="dynamic-items-list"
|
||||
search-url={ searchURL }
|
||||
className={ className }
|
||||
collection-id={ collectionId }
|
||||
show-image={ '' + showImage }
|
||||
show-name={ '' + showName }
|
||||
|
|
|
@ -237,6 +237,7 @@
|
|||
ul.items-list-edit li.item-list-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
|
||||
button {
|
||||
position: absolute !important;
|
||||
|
@ -387,7 +388,7 @@
|
|||
align-items: center;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
|
@ -420,8 +421,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -502,7 +504,7 @@
|
|||
padding: 12px 12px 24px 12px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -531,8 +533,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -576,7 +579,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
}
|
||||
|
@ -601,8 +604,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -1047,5 +1051,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-dynamic-items-list {
|
||||
li.item-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ export default (element) => {
|
|||
layout: 'grid',
|
||||
gridMargin: 0,
|
||||
searchURL: '',
|
||||
selectedItems: [],
|
||||
loadStrategy: 'search',
|
||||
maxItemsNumber: 12,
|
||||
mosaicHeight: 40,
|
||||
mosaicDensity: 5,
|
||||
|
@ -49,7 +51,8 @@ export default (element) => {
|
|||
collectionTextColor: '#ffffff',
|
||||
tainacanApiRoot: '',
|
||||
tainacanBaseUrl: '',
|
||||
className: ''
|
||||
className: '',
|
||||
style: ''
|
||||
},
|
||||
render(h){
|
||||
return h(DynamicItemsListTheme, {
|
||||
|
@ -68,6 +71,8 @@ export default (element) => {
|
|||
maxColumnsCount: this.maxColumnsCount,
|
||||
cropImagesToSquare: this.cropImagesToSquare,
|
||||
searchURL: this.searchURL,
|
||||
selectedItems: this.selectedItems,
|
||||
loadStrategy: this.loadStrategy,
|
||||
maxItemsNumber: this.maxItemsNumber,
|
||||
order: this.order,
|
||||
showSearchBar: this.showSearchBar,
|
||||
|
@ -77,13 +82,16 @@ export default (element) => {
|
|||
collectionTextColor: this.collectionTextColor,
|
||||
tainacanApiRoot: this.tainacanApiRoot,
|
||||
tainacanBaseUrl: this.tainacanBaseUrl,
|
||||
className: this.className
|
||||
className: this.className,
|
||||
style: this.style
|
||||
}
|
||||
});
|
||||
},
|
||||
beforeMount () {
|
||||
this.className = this.$el.attributes.class != undefined ? this.$el.attributes.class.value : undefined;
|
||||
this.searchURL = this.$el.attributes['search-url'] != undefined ? this.$el.attributes['search-url'].value : undefined;
|
||||
this.selectedItems = this.$el.attributes['selected-items'] != undefined ? JSON.parse(this.$el.attributes['selected-items'].value) : undefined;
|
||||
this.loadStrategy = this.$el.attributes['load-strategy'] != undefined ? this.$el.attributes['load-strategy'].value : undefined;
|
||||
this.collectionId = this.$el.attributes['collection-id'] != undefined ? this.$el.attributes['collection-id'].value : undefined;
|
||||
this.showImage = this.$el.attributes['show-image'] != undefined ? this.$el.attributes['show-image'].value == 'true' : true;
|
||||
this.showName = this.$el.attributes['show-name'] != undefined ? this.$el.attributes['show-name'].value == 'true' : true;
|
||||
|
@ -106,6 +114,7 @@ export default (element) => {
|
|||
this.collectionTextColor = this.$el.attributes['collection-text-color'] != undefined ? this.$el.attributes['collection-text-color'].value : undefined;
|
||||
this.tainacanApiRoot = this.$el.attributes['tainacan-api-root'] != undefined ? this.$el.attributes['tainacan-api-root'].value : undefined;
|
||||
this.tainacanBaseUrl = this.$el.attributes['tainacan-base-url'] != undefined ? this.$el.attributes['tainacan-base-url'].value : undefined;
|
||||
this.style = this.$el.attributes.style != undefined ? this.$el.attributes.style.value : undefined;
|
||||
},
|
||||
methods: {
|
||||
__(text, domain) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div :class="className + ' has-mounted'">
|
||||
<div
|
||||
:style="style"
|
||||
:class="className + ' has-mounted'">
|
||||
<div v-if="showCollectionHeader">
|
||||
<div
|
||||
v-if="isLoadingCollection"
|
||||
|
@ -288,6 +290,8 @@ export default {
|
|||
layout: String,
|
||||
gridMargin: Number,
|
||||
searchURL: String,
|
||||
selectedItems: Array,
|
||||
loadStrategy: String,
|
||||
maxItemsNumber: Number,
|
||||
mosaicDensity: Number,
|
||||
mosaicHeight: Number,
|
||||
|
@ -305,7 +309,8 @@ export default {
|
|||
collectionTextColor: String,
|
||||
tainacanApiRoot: String,
|
||||
tainacanBaseUrl: String,
|
||||
className: String
|
||||
className: String,
|
||||
style: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -357,70 +362,98 @@ export default {
|
|||
|
||||
this.itemsRequestSource = axios.CancelToken.source();
|
||||
|
||||
let endpoint = '/collection' + this.searchURL.split('#')[1].split('/collections')[1];
|
||||
let query = endpoint.split('?')[1];
|
||||
let queryObject = qs.parse(query);
|
||||
if (this.loadStrategy == 'parent') {
|
||||
|
||||
// Set up max items to be shown
|
||||
if (this.maxItemsNumber != undefined && Number(this.maxItemsNumber) > 0)
|
||||
queryObject.perpage = this.maxItemsNumber;
|
||||
else if (queryObject.perpage != undefined && queryObject.perpage > 0)
|
||||
this.localMaxItemsNumber = queryObject.perpage;
|
||||
else {
|
||||
queryObject.perpage = 12;
|
||||
this.localMaxItemsNumber = 12;
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (this.localOrder != undefined)
|
||||
queryObject.order = this.localOrder;
|
||||
else if (queryObject.order != undefined)
|
||||
this.localOrder = queryObject.order;
|
||||
else {
|
||||
queryObject.order = 'asc';
|
||||
this.localOrder = 'asc';
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (this.searchString != undefined)
|
||||
queryObject.search = this.searchString;
|
||||
else if (queryObject.search != undefined)
|
||||
this.searchString = queryObject.search;
|
||||
else {
|
||||
delete queryObject.search;
|
||||
this.searchString = undefined;
|
||||
}
|
||||
|
||||
// Set up paging
|
||||
if (this.paged != undefined)
|
||||
queryObject.paged = this.paged;
|
||||
else if (queryObject.paged != undefined)
|
||||
this.paged = queryObject.paged;
|
||||
else
|
||||
this.paged = 1;
|
||||
|
||||
// emove unecessary queries
|
||||
delete queryObject.readmode;
|
||||
delete queryObject.iframemode;
|
||||
delete queryObject.admin_view_mode;
|
||||
delete queryObject.fetch_only_meta;
|
||||
|
||||
endpoint = endpoint.split('?')[0] + '?' + qs.stringify(queryObject) + '&fetch_only=title,url,thumbnail';
|
||||
|
||||
this.tainacanAxios.get(endpoint, { cancelToken: this.itemsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
for (let item of response.data.items)
|
||||
this.items.push(item);
|
||||
for (let item of this.selectedItems)
|
||||
this.items.push(item);
|
||||
|
||||
this.isLoading = false;
|
||||
this.totalItems = response.headers['x-wp-total'];
|
||||
this.totalItems = this.items.length;
|
||||
|
||||
}).catch((error) => {
|
||||
this.isLoading = false;
|
||||
if (error.response && error.response.status && error.response.status == 401)
|
||||
this.errorMessage = 'Not allowed to see these items.'
|
||||
});
|
||||
} else if (this.loadStrategy == 'selection') {
|
||||
let endpoint = '/collection/' + this.collectionId + '/items?' + qs.stringify({ postin: this.selectedItems, perpage: this.selectedItems.length }) + '&fetch_only=title,url,thumbnail';
|
||||
|
||||
this.tainacanAxios.get(endpoint, { cancelToken: this.itemsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
for (let item of response.data.items)
|
||||
this.items.push(item);
|
||||
|
||||
this.isLoading = false;
|
||||
this.totalItems = response.headers['x-wp-total'];
|
||||
|
||||
}).catch((error) => {
|
||||
this.isLoading = false;
|
||||
if (error.response && error.response.status && error.response.status == 401)
|
||||
this.errorMessage = 'Not allowed to see these items.'
|
||||
});
|
||||
} else {
|
||||
|
||||
let endpoint = '/collection' + this.searchURL.split('#')[1].split('/collections')[1];
|
||||
let query = endpoint.split('?')[1];
|
||||
let queryObject = qs.parse(query);
|
||||
|
||||
// Set up max items to be shown
|
||||
if (this.maxItemsNumber != undefined && Number(this.maxItemsNumber) > 0)
|
||||
queryObject.perpage = this.maxItemsNumber;
|
||||
else if (queryObject.perpage != undefined && queryObject.perpage > 0)
|
||||
this.localMaxItemsNumber = queryObject.perpage;
|
||||
else {
|
||||
queryObject.perpage = 12;
|
||||
this.localMaxItemsNumber = 12;
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (this.localOrder != undefined)
|
||||
queryObject.order = this.localOrder;
|
||||
else if (queryObject.order != undefined)
|
||||
this.localOrder = queryObject.order;
|
||||
else {
|
||||
queryObject.order = 'asc';
|
||||
this.localOrder = 'asc';
|
||||
}
|
||||
|
||||
// Set up sorting order
|
||||
if (this.searchString != undefined)
|
||||
queryObject.search = this.searchString;
|
||||
else if (queryObject.search != undefined)
|
||||
this.searchString = queryObject.search;
|
||||
else {
|
||||
delete queryObject.search;
|
||||
this.searchString = undefined;
|
||||
}
|
||||
|
||||
// Set up paging
|
||||
if (this.paged != undefined)
|
||||
queryObject.paged = this.paged;
|
||||
else if (queryObject.paged != undefined)
|
||||
this.paged = queryObject.paged;
|
||||
else
|
||||
this.paged = 1;
|
||||
|
||||
// emove unecessary queries
|
||||
delete queryObject.readmode;
|
||||
delete queryObject.iframemode;
|
||||
delete queryObject.admin_view_mode;
|
||||
delete queryObject.fetch_only_meta;
|
||||
|
||||
endpoint = endpoint.split('?')[0] + '?' + qs.stringify(queryObject) + '&fetch_only=title,url,thumbnail';
|
||||
|
||||
this.tainacanAxios.get(endpoint, { cancelToken: this.itemsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
for (let item of response.data.items)
|
||||
this.items.push(item);
|
||||
|
||||
this.isLoading = false;
|
||||
this.totalItems = response.headers['x-wp-total'];
|
||||
|
||||
}).catch((error) => {
|
||||
this.isLoading = false;
|
||||
if (error.response && error.response.status && error.response.status == 401)
|
||||
this.errorMessage = 'Not allowed to see these items.'
|
||||
});
|
||||
}
|
||||
},
|
||||
fetchCollectionForHeader() {
|
||||
if (this.showCollectionHeader) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/facets-list",
|
||||
"title": "Tainacan Facets List",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "facets", "search", "terms" ],
|
||||
"description": "List facets from a Tainacan Collection or Repository",
|
||||
|
@ -131,6 +132,10 @@
|
|||
"isLoadingChildTerms": {
|
||||
"type": "Number",
|
||||
"default": null
|
||||
},
|
||||
"itemsCountStyle": {
|
||||
"type": "String",
|
||||
"default": "default"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
|
@ -138,6 +143,12 @@
|
|||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "facets-list",
|
||||
|
|
|
@ -1,4 +1,186 @@
|
|||
export default [
|
||||
/* Deprecated on Tainacan 0.18.6 due to itemsCountStyle */
|
||||
{
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "Array",
|
||||
"source": "children",
|
||||
"selector": "div"
|
||||
},
|
||||
"collectionId": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"collectionSlug": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"facets": {
|
||||
"type": "Array",
|
||||
"default": []
|
||||
},
|
||||
"facetsObject": {
|
||||
"type": "Array",
|
||||
"default": []
|
||||
},
|
||||
"showImage": {
|
||||
"type": "Boolean",
|
||||
"default": true
|
||||
},
|
||||
"nameInsideImage": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"showItemsCount": {
|
||||
"type": "Boolean",
|
||||
"default": true
|
||||
},
|
||||
"showLoadMore": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"showSearchBar": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"layout": {
|
||||
"type": "String",
|
||||
"default": "grid"
|
||||
},
|
||||
"cloudRate": {
|
||||
"type": "Number",
|
||||
"default": 1
|
||||
},
|
||||
"isModalOpen": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"gridMargin": {
|
||||
"type": "Number",
|
||||
"default": 24
|
||||
},
|
||||
"metadatumId": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"metadatumType": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"facetsRequestSource": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"maxFacetsNumber": {
|
||||
"type": "Number",
|
||||
"value": 12
|
||||
},
|
||||
"isLoading": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"isLoadingCollection": {
|
||||
"type": "Boolean",
|
||||
"value": false
|
||||
},
|
||||
"collection": {
|
||||
"type": "Object",
|
||||
"value": {}
|
||||
},
|
||||
"searchString": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"blockId": {
|
||||
"type": "String",
|
||||
"default": ""
|
||||
},
|
||||
"parentTerm": {
|
||||
"type": "Number",
|
||||
"default": null
|
||||
},
|
||||
"isParentTermModalOpen": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"maxColumnsCount": {
|
||||
"type": "Number",
|
||||
"default": 5
|
||||
},
|
||||
"appendChildTerms": {
|
||||
"type": "Boolean",
|
||||
"default": false
|
||||
},
|
||||
"childFacetsObject": {
|
||||
"type": "Object",
|
||||
"default": {}
|
||||
},
|
||||
"linkTermFacetsToTermPage": {
|
||||
"type": "Boolean",
|
||||
"default": true
|
||||
},
|
||||
"isLoadingChildTerms": {
|
||||
"type": "Number",
|
||||
"default": null
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"align": ["full", "wide"],
|
||||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
save({ attributes, className }){
|
||||
const {
|
||||
content,
|
||||
blockId,
|
||||
collectionId,
|
||||
collectionSlug,
|
||||
parentTerm,
|
||||
showImage,
|
||||
nameInsideImage,
|
||||
showItemsCount,
|
||||
showLoadMore,
|
||||
layout,
|
||||
cloudRate,
|
||||
gridMargin,
|
||||
metadatumId,
|
||||
metadatumType,
|
||||
maxFacetsNumber,
|
||||
maxColumnsCount,
|
||||
showSearchBar,
|
||||
linkTermFacetsToTermPage,
|
||||
appendChildTerms
|
||||
} = attributes;
|
||||
return <div
|
||||
data-module="facets-list"
|
||||
className={ className }
|
||||
metadatum-id={ metadatumId }
|
||||
metadatum-type={ metadatumType }
|
||||
collection-id={ collectionId }
|
||||
collection-slug={ collectionSlug }
|
||||
parent-term-id={ parentTerm ? parentTerm.id : undefined }
|
||||
show-image={ '' + showImage }
|
||||
name-inside-image={ nameInsideImage === true ? 'true' : 'false' }
|
||||
show-items-count={ '' + showItemsCount }
|
||||
show-search-bar={ '' + showSearchBar }
|
||||
show-load-more={ '' + showLoadMore }
|
||||
append-child-terms={ (appendChildTerms === true ? 'true' : 'false') }
|
||||
link-term-facets-to-term-page={ linkTermFacetsToTermPage === false ? 'false' : 'true' }
|
||||
layout={ layout }
|
||||
cloud-rate={ cloudRate }
|
||||
grid-margin={ gridMargin }
|
||||
max-facets-number={ maxFacetsNumber }
|
||||
max-columns-count={ maxColumnsCount }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
tainacan-site-url={ tainacan_blocks.site_url }
|
||||
id={ 'wp-block-tainacan-facets-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
}
|
||||
},
|
||||
/* Deprecated on Tainacan 0.18.4 due to new block.json strategy */
|
||||
{
|
||||
attributes: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const { __ } = wp.i18n;
|
||||
|
||||
const { BaseControl, RangeControl, Spinner, Button, ToggleControl, Tooltip, Placeholder, PanelBody } = wp.components;
|
||||
const { BaseControl, RangeControl, Spinner, SelectControl, Button, ToggleControl, Placeholder, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import MetadataModal from './metadata-modal.js';
|
||||
import ParentTermModal from './parent-term-modal.js';
|
||||
|
@ -17,7 +17,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
facetsObject,
|
||||
content,
|
||||
collectionId,
|
||||
collectionSlug,
|
||||
collectionSlug,
|
||||
showImage,
|
||||
nameInsideImage,
|
||||
showItemsCount,
|
||||
|
@ -39,9 +39,13 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
appendChildTerms,
|
||||
childFacetsObject,
|
||||
linkTermFacetsToTermPage,
|
||||
isLoadingChildTerms
|
||||
isLoadingChildTerms,
|
||||
itemsCountStyle
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
// Obtains block's client id to render it on save function
|
||||
setAttributes({ blockId: clientId });
|
||||
|
||||
|
@ -70,6 +74,11 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
gridMargin = 24;
|
||||
setAttributes({ gridMargin: gridMargin });
|
||||
}
|
||||
if (itemsCountStyle === undefined) {
|
||||
itemsCountStyle = 'default';
|
||||
setAttributes({ itemsCountStyle: itemsCountStyle });
|
||||
}
|
||||
|
||||
// Uptades previous logic of metadatum type
|
||||
if (metadatumType == __('Taxonomy', 'tainacan')) {
|
||||
metadatumType = 'Tainacan\\Metadata_Types\\Taxonomy';
|
||||
|
@ -91,7 +100,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
href={ !appendChildTerms ? ((linkTermFacetsToTermPage && isMetadatumTypeTaxonomy(metadatumType)) ? facet.term_url : facet.url) : (facet.total_children > 0 ? null : (linkTermFacetsToTermPage ? facet.term_url : facet.url)) }
|
||||
onClick={ () => { (appendChildTerms && facet.total_children > 0) ? displayChildTerms(facetId) : null } }
|
||||
target="_blank"
|
||||
style={{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'rem' : ''}}>
|
||||
style={{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'em' : ''}}>
|
||||
{ isMetadatumTypeTaxonomy(metadatumType) ?
|
||||
<img
|
||||
src={
|
||||
|
@ -120,8 +129,19 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
alt={ facet.label ? facet.label : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
: null
|
||||
}
|
||||
<span>{ facet.label ? facet.label : '' }</span>
|
||||
{ facet.total_items ? <span class="facet-item-count" style={{ display: !showItemsCount ? 'none' : '' }}> ({ facet.total_items })</span> : null }
|
||||
<div className={ 'facet-label-and-count' + (itemsCountStyle === 'below' ? ' is-style-facet-label-and-count--below' : '') }>
|
||||
<span>{ facet.label ? facet.label : '' }</span>
|
||||
{
|
||||
facet.total_items ?
|
||||
<span class="facet-item-count" style={{ display: !showItemsCount ? 'none' : '' }}>
|
||||
{ itemsCountStyle === 'below' ?
|
||||
( facet.total_items != 1 ? (facet.total_items + ' ' + __('items', 'tainacan' )) : (facet.total_items + ' ' + __('item', 'tainacan' )) )
|
||||
:
|
||||
( ' (' + facet.total_items + ')' )
|
||||
}
|
||||
</span>
|
||||
: null }
|
||||
</div>
|
||||
{ appendChildTerms && facet.total_children > 0 ?
|
||||
( childFacetsObject[facetId] && childFacetsObject[facetId].visible ?
|
||||
<svg
|
||||
|
@ -425,7 +445,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/facets-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
<BlockControls>
|
||||
|
@ -500,7 +520,21 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
updateContent();
|
||||
}
|
||||
}
|
||||
/>
|
||||
/>
|
||||
{ showItemsCount ?
|
||||
<SelectControl
|
||||
label={__('Facets label style', 'tainacan')}
|
||||
value={ itemsCountStyle }
|
||||
options={ [
|
||||
{ label: __('Items count in between parenthesis', 'tainacan'), value: 'default' },
|
||||
{ label: __('Items count below label', 'tainacan'), value: 'below' },
|
||||
] }
|
||||
onChange={ ( aStyle ) => {
|
||||
itemsCountStyle = aStyle;
|
||||
setAttributes({ itemsCountStyle: itemsCountStyle });
|
||||
updateContent();
|
||||
}}/>
|
||||
: null }
|
||||
</PanelBody>
|
||||
{/* Settings related only to facets from Taxonomy metadata */}
|
||||
{ isMetadatumTypeTaxonomy(metadatumType) ?
|
||||
|
@ -802,7 +836,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
<ul
|
||||
style={{
|
||||
gridGap: layout == 'grid' ? (gridMargin + 'px') : 'inherit',
|
||||
marginTop: showSearchBar ? '1.5rem' : '0px'
|
||||
marginTop: showSearchBar ? '1.5em' : '0px'
|
||||
}}
|
||||
className={ 'facets-list-edit facets-layout-' + layout + (maxColumnsCount ? ' max-columns-count-' + maxColumnsCount : '') }>
|
||||
{ facets }
|
||||
|
@ -810,7 +844,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
:
|
||||
<ul
|
||||
style={{
|
||||
marginTop: showSearchBar ? '1.5rem' : '0px'
|
||||
marginTop: showSearchBar ? '1.5em' : '0px'
|
||||
}}
|
||||
className={ 'facets-list-edit facets-layout-' + layout + (maxColumnsCount ? ' max-columns-count-' + maxColumnsCount : '') }>
|
||||
{
|
||||
|
@ -828,26 +862,24 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
|||
}
|
||||
|
||||
{ showLoadMore && facets.length > 0 && !isLoading ?
|
||||
<Tooltip text={__('If necessary, the show more button will be available on post or page.', 'tainacan')}>
|
||||
<button
|
||||
class="show-more-button"
|
||||
disabled
|
||||
label={__('Show more', 'tainacan')}>
|
||||
<span class="icon">
|
||||
<i>
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="4 5 24 24">
|
||||
<path d="M 7.41,8.295 6,9.705 l 6,6 6,-6 -1.41,-1.41 -4.59,4.58 z"/>
|
||||
<path
|
||||
d="M0 0h24v24H0z"
|
||||
fill="none"/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
</Tooltip>
|
||||
<button
|
||||
class="show-more-button"
|
||||
disabled
|
||||
label={__('Show more', 'tainacan')}>
|
||||
<span class="icon">
|
||||
<i>
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="4 5 24 24">
|
||||
<path d="M 7.41,8.295 6,9.705 l 6,6 6,-6 -1.41,-1.41 -4.59,4.58 z"/>
|
||||
<path
|
||||
d="M0 0h24v24H0z"
|
||||
fill="none"/>
|
||||
</svg>
|
||||
</i>
|
||||
</span>
|
||||
</button>
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -32,17 +32,24 @@
|
|||
`${tainacanBaseUrl}/assets/images/placeholder_square.png`)
|
||||
"
|
||||
:alt="facet.label ? facet.label : $root.__('Thumbnail', 'tainacan')">
|
||||
<span>{{ facet.label ? facet.label : '' }}</span>
|
||||
<span
|
||||
v-if="facet.total_items"
|
||||
class="facet-item-count"
|
||||
:style="{ display: !showItemsCount ? 'none' : '' }">
|
||||
({{ facet.total_items }})
|
||||
</span>
|
||||
<div :class=" 'facet-label-and-count' + (itemsCountStyle === 'below' ? ' is-style-facet-label-and-count--below' : '')">
|
||||
<span>{{ facet.label ? facet.label : '' }}</span>
|
||||
<span
|
||||
v-if="facet.total_items"
|
||||
class="facet-item-count"
|
||||
:style="{ display: !showItemsCount ? 'none' : '' }">
|
||||
<template v-if="itemsCountStyle === 'below'">
|
||||
{{ facet.total_items != 1 ? (facet.total_items + ' ' + $root.__('items', 'tainacan' )) : (facet.total_items + ' ' + $root.__('item', 'tainacan' )) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
({{ facet.total_items }})
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
<template v-if="appendChildTerms && facet.total_children > 0">
|
||||
<svg
|
||||
v-if="childFacetsObject[facetId] && childFacetsObject[facetId].visible"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="-4 -3 16 16"
|
||||
height="32px"
|
||||
width="32px">
|
||||
|
@ -136,7 +143,8 @@ export default {
|
|||
metadatumType: String,
|
||||
childFacetsObject: Object,
|
||||
isMetadatumTypeTaxonomy: Boolean,
|
||||
isMetadatumTypeRelationship: Boolean
|
||||
isMetadatumTypeRelationship: Boolean,
|
||||
itemsCountStyle: String
|
||||
},
|
||||
computed:{
|
||||
facetId() {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const {
|
||||
content,
|
||||
|
@ -18,11 +20,15 @@ export default function({ attributes, className }) {
|
|||
maxColumnsCount,
|
||||
showSearchBar,
|
||||
linkTermFacetsToTermPage,
|
||||
appendChildTerms
|
||||
appendChildTerms,
|
||||
itemsCountStyle
|
||||
} = attributes;
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div
|
||||
{ ...blockProps }
|
||||
data-module="facets-list"
|
||||
className={ className }
|
||||
metadatum-id={ metadatumId }
|
||||
metadatum-type={ metadatumType }
|
||||
collection-id={ collectionId }
|
||||
|
@ -36,6 +42,7 @@ export default function({ attributes, className }) {
|
|||
append-child-terms={ (appendChildTerms === true ? 'true' : 'false') }
|
||||
link-term-facets-to-term-page={ linkTermFacetsToTermPage === false ? 'false' : 'true' }
|
||||
layout={ layout }
|
||||
items-count-style={ itemsCountStyle }
|
||||
cloud-rate={ cloudRate }
|
||||
grid-margin={ gridMargin }
|
||||
max-facets-number={ maxFacetsNumber }
|
||||
|
|
|
@ -369,13 +369,26 @@
|
|||
max-width: 220px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.is-style-facet-label-and-count--below {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
span.facet-item-count {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.facet-with-name-inside-image) img {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
|
@ -384,7 +397,8 @@
|
|||
}
|
||||
|
||||
&:not(.facet-with-name-inside-image) span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, $gray3);
|
||||
color: inherit;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
&.facet-with-name-inside-image a span {
|
||||
|
@ -410,7 +424,7 @@
|
|||
&:hover.facet-with-name-inside-image a span { opacity: 1 };
|
||||
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -491,9 +505,10 @@
|
|||
width: 100%;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
line-height: normal;
|
||||
height: auto;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
word-break: break-all;
|
||||
|
@ -514,6 +529,18 @@
|
|||
overflow: visible;
|
||||
}
|
||||
|
||||
.facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.is-style-facet-label-and-count--below {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
span.facet-item-count {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.facet-without-image {
|
||||
min-height: 0.875em;
|
||||
a {
|
||||
|
@ -525,12 +552,13 @@
|
|||
}
|
||||
}
|
||||
span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, $gray3);
|
||||
color: inherit;
|
||||
opacity: 0.65;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -579,12 +607,14 @@
|
|||
vertical-align: middle;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
text-decoration: none;
|
||||
display: inline;
|
||||
min-height: 54px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img {
|
||||
|
@ -602,22 +632,34 @@
|
|||
margin-bottom: -12px;
|
||||
}
|
||||
|
||||
.facet-label-and-count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.is-style-facet-label-and-count--below {
|
||||
flex-direction: column;
|
||||
span.facet-item-count {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.facet-without-image img {
|
||||
display: none;
|
||||
}
|
||||
span.facet-item-count {
|
||||
color: var(--tainacan-block-gray3, $gray3);
|
||||
color: inherit;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-primary, $primary);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
&:hover.facet-term-with-children,
|
||||
&:hover.facet-term-with-children a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -641,6 +683,23 @@
|
|||
fill: white;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.has-text-color) li.facet-list-item {
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:hover .facet-item-count,
|
||||
&:focus .facet-item-count {
|
||||
color: var(--tainacan-block-primary, $primary);
|
||||
}
|
||||
.facet-item-count {
|
||||
opacity: 1.0;
|
||||
color: var(--tainacan-block-gray3, $gray3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.child-reveal-enter-active {
|
||||
|
|
|
@ -39,6 +39,7 @@ export default (element) => {
|
|||
linkTermFacetsToTermPage: true,
|
||||
appendChildTerms: false,
|
||||
layout: 'grid',
|
||||
itemsCountStyle: 'default',
|
||||
cloudRate: 1,
|
||||
gridMargin: 24,
|
||||
maxFacetsNumber: 12,
|
||||
|
@ -46,7 +47,8 @@ export default (element) => {
|
|||
tainacanApiRoot: '',
|
||||
tainacanBaseUrl: '',
|
||||
tainacanSiteUrl: '',
|
||||
className: ''
|
||||
className: '',
|
||||
style: ''
|
||||
},
|
||||
render(h){
|
||||
return h(FacetsListTheme, {
|
||||
|
@ -62,6 +64,7 @@ export default (element) => {
|
|||
showSearchBar: this.showSearchBar,
|
||||
showLoadMore: this.showLoadMore,
|
||||
layout: this.layout,
|
||||
itemsCountStyle: this.itemsCountStyle,
|
||||
cloudRate: this.cloudRate,
|
||||
gridMargin: this.gridMargin,
|
||||
linkTermFacetsToTermPage: this.linkTermFacetsToTermPage,
|
||||
|
@ -71,7 +74,8 @@ export default (element) => {
|
|||
tainacanApiRoot: this.tainacanApiRoot,
|
||||
tainacanBaseUrl: this.tainacanBaseUrl,
|
||||
tainacanSiteUrl: this.tainacanSiteUrl,
|
||||
className: this.className
|
||||
className: this.className,
|
||||
style: this.style
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -88,6 +92,7 @@ export default (element) => {
|
|||
this.showSearchBar = this.$el.attributes['show-search-bar'] != undefined ? this.$el.attributes['show-search-bar'].value == 'true' : false;
|
||||
this.showLoadMore = this.$el.attributes['show-load-more'] != undefined ? this.$el.attributes['show-load-more'].value == 'true' : false;
|
||||
this.layout = this.$el.attributes['layout'] != undefined ? this.$el.attributes['layout'].value : undefined;
|
||||
this.itemsCountStyle = this.$el.attributes['items-count-style'] != undefined ? this.$el.attributes['items-count-style'].value : undefined;
|
||||
this.cloudRate = this.$el.attributes['cloud-rate'] != undefined ? Number(this.$el.attributes['cloud-rate'].value) : undefined;
|
||||
this.gridMargin = this.$el.attributes['grid-margin'] != undefined ? Number(this.$el.attributes['grid-margin'].value) : undefined;
|
||||
this.linkTermFacetsToTermPage = this.$el.attributes['link-term-facets-to-term-page'] != undefined ? this.$el.attributes['link-term-facets-to-term-page'].value == 'true' : true;
|
||||
|
@ -97,6 +102,7 @@ export default (element) => {
|
|||
this.tainacanBaseUrl = this.$el.attributes['tainacan-base-url'] != undefined ? this.$el.attributes['tainacan-base-url'].value : undefined;
|
||||
this.tainacanSiteUrl = this.$el.attributes['tainacan-site-url'] != undefined ? this.$el.attributes['tainacan-site-url'].value : undefined;
|
||||
this.className = this.$el.attributes.class != undefined ? this.$el.attributes.class.value : undefined;
|
||||
this.style = this.$el.attributes.style != undefined ? this.$el.attributes.style.value : undefined;
|
||||
},
|
||||
methods: {
|
||||
__(text, domain) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div :class="className + ' has-mounted'">
|
||||
<div
|
||||
:style="style"
|
||||
:class="className + ' has-mounted'">
|
||||
<div
|
||||
v-if="showSearchBar"
|
||||
class="facets-search-bar">
|
||||
|
@ -89,6 +91,7 @@
|
|||
:append-child-terms="appendChildTerms"
|
||||
:facet="facet"
|
||||
:cloud-rate="cloudRate"
|
||||
:items-count-style="itemsCountStyle"
|
||||
:tainacan-base-url="tainacanBaseUrl"
|
||||
:layout="layout"
|
||||
:metadatum-type="metadatumType"
|
||||
|
@ -119,6 +122,7 @@
|
|||
:append-child-terms="appendChildTerms"
|
||||
:facet="facet"
|
||||
:cloud-rate="cloudRate"
|
||||
:items-count-style="itemsCountStyle"
|
||||
:tainacan-base-url="tainacanBaseUrl"
|
||||
:layout="layout"
|
||||
:metadatum-type="metadatumType"
|
||||
|
@ -180,6 +184,7 @@ export default {
|
|||
showLoadMore: Boolean,
|
||||
appendChildTerms: Boolean,
|
||||
linkTermFacetsToTermPage: Boolean,
|
||||
itemsCountStyle: String,
|
||||
layout: String,
|
||||
cloudRate: Number,
|
||||
gridMargin: Number,
|
||||
|
@ -188,7 +193,8 @@ export default {
|
|||
tainacanApiRoot: String,
|
||||
tainacanBaseUrl: String,
|
||||
tainacanSiteUrl: String,
|
||||
className: String
|
||||
className: String,
|
||||
style: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -218,23 +224,38 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
|
||||
|
||||
if (tainacan_blocks && tainacan_blocks.nonce)
|
||||
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_blocks.nonce;
|
||||
|
||||
this.offset = 0;
|
||||
this.fetchFacets();
|
||||
|
||||
this.applySearchString = debounce(this.applySearchString, 750);
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('tainacan-blocks-facets-list-update', this.receiveSearchString);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$el.removeEventListener('tainacan-blocks-facets-list-update', this.receiveSearchString);
|
||||
},
|
||||
methods: {
|
||||
applySearchString: debounce(function(event) {
|
||||
|
||||
receiveSearchString(event) {
|
||||
if (event.detail) {
|
||||
this.applySearchString({ target: { value: event.detail.searchString }});
|
||||
}
|
||||
},
|
||||
applySearchString(event) {
|
||||
|
||||
let value = event.target.value;
|
||||
|
||||
|
||||
if (this.searchString != value) {
|
||||
this.searchString = value;
|
||||
this.offset = 0;
|
||||
this.lastTerm = '';
|
||||
this.fetchFacets();
|
||||
}
|
||||
}, 500),
|
||||
},
|
||||
loadMore() {
|
||||
this.offset += Number(this.maxFacetsNumber);
|
||||
this.fetchFacets();
|
||||
|
@ -294,7 +315,7 @@ export default {
|
|||
|
||||
this.tainacanAxios.get(endpoint, { cancelToken: this.facetsRequestSource.token })
|
||||
.then(response => {
|
||||
|
||||
|
||||
if (this.isMetadatumTypeTaxonomy) {
|
||||
for (let facet of response.data.values) {
|
||||
this.facets.push(Object.assign({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/items-list",
|
||||
"title": "Tainacan Items List",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "items", "collection" ],
|
||||
"description": "Expose items from your Tainacan collections",
|
||||
|
@ -90,6 +91,12 @@
|
|||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "items-list",
|
||||
|
|
|
@ -2,7 +2,7 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { RangeControl, IconButton, Button, ToggleControl, Placeholder, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js';
|
||||
import ItemsModal from './items-modal.js';
|
||||
|
@ -20,6 +20,9 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
gridMargin
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
function prepareItem(item) {
|
||||
return (
|
||||
<li
|
||||
|
@ -125,13 +128,13 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
];
|
||||
|
||||
return content == 'preview' ?
|
||||
<div className={className}>
|
||||
<img
|
||||
width="100%"
|
||||
src={ `${tainacan_blocks.base_url}/assets/images/items-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<img
|
||||
width="100%"
|
||||
src={ `${tainacan_blocks.base_url}/assets/images/items-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const { content } = attributes;
|
||||
return <div data-module="items-list" className={className}>{ content }</div>
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div { ...blockProps } data-module="items-list">{ content }</div>
|
||||
};
|
|
@ -54,7 +54,7 @@
|
|||
width: 185px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
|
@ -77,8 +77,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +153,7 @@
|
|||
width: calc(20% - 24px);
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -172,8 +173,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -196,6 +198,14 @@
|
|||
min-width: calc(100% - 24px);
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-items-list {
|
||||
li.item-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/search-bar",
|
||||
"title": "Tainacan Search Bar",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "items", "search", "bar" ],
|
||||
"description": "Set up a custom search bar to redirect to an item's list",
|
||||
|
|
|
@ -2,7 +2,7 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { RangeControl, TextControl, SelectControl, Button, ToggleControl, Placeholder, ColorPicker, ColorPalette, BaseControl, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js';
|
||||
import SearchBarModal from './search-bar-modal.js';
|
||||
|
@ -27,6 +27,9 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
collectionName
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
function setContent(){
|
||||
|
||||
setAttributes({
|
||||
|
@ -195,7 +198,7 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/search-bar.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
<BlockControls>
|
||||
|
@ -203,7 +206,7 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
{ collectionId ?
|
||||
TainacanBlocksCompatToolbar({
|
||||
label:__('Configure search source', 'tainacan'),
|
||||
icon: <svg width="24" height="24" viewBox="-2 -4 20 20">
|
||||
icon: <svg width="24" height="24" viewBox="-2 -2 20 20">
|
||||
<path d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5
|
||||
c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6
|
||||
c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2
|
||||
|
@ -475,7 +478,7 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
style={{ fill: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="-2 -4 20 20">
|
||||
viewBox="-2 -2 20 20">
|
||||
<path d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5
|
||||
c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6
|
||||
c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2
|
||||
|
@ -520,7 +523,7 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
|||
style={{ fill: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="-2 -4 20 20">
|
||||
viewBox="-2 -2 20 20">
|
||||
<path d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5
|
||||
c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6
|
||||
c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }) {
|
||||
const { content } = attributes;
|
||||
return <div data-module="search-bar" className={ className }>{ content }</div>
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div { ...blockProps } data-module="search-bar">{ content }</div>
|
||||
}
|
|
@ -46,6 +46,7 @@
|
|||
}
|
||||
button {
|
||||
height: auto !important;
|
||||
min-height: 1.75em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: none;
|
||||
|
@ -54,11 +55,13 @@
|
|||
background: white;
|
||||
padding: 4px 1em;
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
|
||||
.icon {
|
||||
height: 1.75em;
|
||||
svg {
|
||||
transform: scale(1);
|
||||
height: 100%;
|
||||
fill: var(--tainacan-block-primary, $primary);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "tainacan/terms-list",
|
||||
"title": "Tainacan Terms List",
|
||||
"apiVersion": 2,
|
||||
"category": "tainacan-blocks",
|
||||
"keywords": [ "terms", "taxonomy" ],
|
||||
"description": "Expose terms from your Tainacan taxonomies",
|
||||
|
@ -86,6 +87,12 @@
|
|||
"html": false,
|
||||
"typography": {
|
||||
"fontSize": true
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": false,
|
||||
"gradients": false,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"editorScript": "terms-list",
|
||||
|
|
|
@ -2,7 +2,7 @@ const { __ } = wp.i18n;
|
|||
|
||||
const { IconButton, Button, ToggleControl, Placeholder, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js';
|
||||
import TermsModal from './terms-modal.js';
|
||||
|
@ -19,6 +19,9 @@ export default function({ attributes, setAttributes, className, isSelected }){
|
|||
taxonomyId,
|
||||
} = attributes;
|
||||
|
||||
// Gets blocks props from hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps();
|
||||
|
||||
function prepareTerm(term) {
|
||||
return (
|
||||
<li
|
||||
|
@ -126,7 +129,7 @@ export default function({ attributes, setAttributes, className, isSelected }){
|
|||
src={ `${tainacan_blocks.base_url}/assets/images/terms-list.png` } />
|
||||
</div>
|
||||
: (
|
||||
<div className={className}>
|
||||
<div { ...blockProps }>
|
||||
|
||||
<div>
|
||||
<BlockControls>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor );
|
||||
|
||||
export default function({ attributes, className }){
|
||||
const { content } = attributes;
|
||||
return <div data-module="terms-list" className={className}>{ content }</div>
|
||||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps.save();
|
||||
return <div { ...blockProps } data-module="terms-list">{ content }</div>
|
||||
};
|
|
@ -36,7 +36,7 @@
|
|||
width: 185px;
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
line-height: normal;
|
||||
|
@ -54,8 +54,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +130,7 @@
|
|||
width: calc(20% - 24px);
|
||||
|
||||
a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -149,8 +150,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
&:hover a {
|
||||
color: var(--tainacan-block-gray5, $gray5);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -175,5 +177,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.block-editor-block-list__block:not(.has-text-color)>.wp-block-tainacan-terms-list {
|
||||
li.term-list-item {
|
||||
a>span,
|
||||
a:hover>span {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue