Merge branch 'develop' into feature/568

This commit is contained in:
Mateus Machado Luna 2021-09-01 15:30:44 -03:00 committed by GitHub
commit 9faad304c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
99 changed files with 2310 additions and 896 deletions

12
package-lock.json generated
View File

@ -7532,9 +7532,9 @@
"dev": true
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"path-to-regexp": {
"version": "0.1.7",
@ -10704,9 +10704,9 @@
}
},
"url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
"integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",

View File

@ -663,7 +663,9 @@ a.pswp__share--download:hover {
.tainacan-media-component__swiper-main li.swiper-slide:not(.swiper-slide-active) {
opacity: 0.75; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata {
text-align: center; }
text-align: center;
font-size: 0.875em;
margin-bottom: 1em; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name .swiper-slide-metadata__name {
display: none;
visibility: hidden; }

File diff suppressed because one or more lines are too long

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;oHAAE;QACE,KAAK,EAAE,oCAAmC;QAC1C,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;MAGvB;sHAAI;QACA,MAAM,EAAE,IAAI;QACZ,KA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AGzB,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"

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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,QAA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FAAE;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/items-list/style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"],
"names": [],
"file": "tainacan-gutenberg-block-items-list.css"

View File

@ -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 {

View File

@ -1,6 +1,6 @@
{
"version": 3,
"mappings": "AAEA,yCAA0C;EACtC,MAAM,EAAE,IAAI;EACZ,eAAe,EAAE,MAAM;;AAE3B,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAEhB,wDAA2B;IACvB,KAAK,EAAE,IAAI;IAEX,mFAA2B;MACvB,MAAM,EAAE,GAAG;MACX,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,MAAM;MACvB,WAAW,EAAE,OAAO;MACpB,MAAM,EAAE,MAAM;MACd,MAAM,EAAE,8CAA6C;MACrD,UAAU,EAAE,sBAAsB;MAElC,mGAAkB;QACd,WAAW,EAAE,CAAC;QACd,eAAe,EAAE,UAAU;MAE/B,oGAAmB;QACf,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,QAAQ;MAE7B,gRAES;QACL,MAAM,EAAE,iBAAiB;MAG7B,yHAAsC;QAClC,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,UAAU;QACnB,aAAa,EAAE,QAAQ;QACvB,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,OAAO;MAEtB,0FAAO;QACH,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,YAAY;QAC3B,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,GAAG;QAEd,gGAAM;UACF,MAAM,EAAE,MAAM;UACd,oGAAI;YACA,SAAS,EAAE,QAAQ;YACnB,IAAI,EAAE,sCAAuC;MAKzD,yCAA0C;QAtD9C,mFAA2B;UAuDnB,WA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AE,KAAK;MACjB,cAAc,EAAE,GAAG;MACnB,SAAS,EAAE,MAAM;MACjB,eAAe,EAAE,aAAa;MAE9B,0HAAoC;QAAE,UAAU,EAAE,IAAI;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"

View File

@ -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 {
color: inherit; }
/*# sourceMappingURL=tainacan-gutenberg-block-terms-list.css.map */

View File

@ -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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d,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"

View File

@ -996,9 +996,11 @@ function tainacan_get_the_mime_type_icon($mime_type, $image_size = 'medium') {
$icon_file = 'placeholder_pdf';
break;
case 'attachment':
$icon_file = 'placeholder_attachment';
break;
case 'empty':
default:
$icon_file = 'placeholder_attachment';
$icon_file = 'placeholder_square';
}
return $images_path . $icon_file . $image_size . '.png';

View File

@ -1174,10 +1174,8 @@ export default {
} else {
parent.postMessage({
type: 'itemCreationMessage',
itemId: this.item.id,
itemTitle: this.item.title,
itemThumbnail: this.item.thumbnail
type: 'itemEditionMessage',
item: this.item
},
tainacan_plugin.admin_url);
}
@ -1206,10 +1204,8 @@ export default {
this.$router.go(-1);
else
parent.postMessage({
type: 'itemCreationMessage',
itemId: null,
itemTitle: null,
itemThumbnail: null
type: 'itemEditionMessage',
item: null
},
tainacan_plugin.admin_url);

View File

@ -278,6 +278,7 @@
</span>
<strong>{{ $i18n.get('label_advanced_metadata_options') }}</strong>
<hr>
</div>
<transition name="filter-item">
@ -371,6 +372,7 @@
'updateMetadatum'
]),
saveEdition(metadatum) {
if ( (metadatum.metadata_type_object && metadatum.metadata_type_object.form_component) || metadatum.edit_form == '') {
let repository = this.editForm.repository_level;
if (repository && repository === 'yes')

View File

@ -208,7 +208,7 @@
const message = event.message ? 'message' : 'data';
const data = event[message];
if (data.type == 'itemCreationMessage') {
if (data.type == 'itemEditionMessage') {
this.editItemModal = false;
}
}

View File

@ -231,7 +231,20 @@ class Compound extends Metadata_Type {
private function get_meta_html(Item_Metadata_Entity $meta) {
$html = '';
if ($meta instanceof Item_Metadata_Entity && !empty($meta->get_value_as_html())) {
$html = '<div class="tainacan-metadatum"><label class="label">' . $meta->get_metadatum()->get_name() . '</label> <p>' . $meta->get_value_as_html() . "</p></div>";
ob_start();
?>
<div class="tainacan-metadatum">
<h4 class="label">
<?php echo $meta->get_metadatum()->get_name(); ?>
</h4>
<p>
<?php echo $meta->get_value_as_html(); ?>
</p>
</div>
<?php
$html = ob_get_contents();
ob_end_clean();
}
return $html;

View File

@ -32,6 +32,8 @@
<div
v-if="loadingMetadata"
class="loading-spinner"/>
</transition>
<transition name="filter-item">
<b-field
v-if="hasMetadata"
:addons="false">
@ -55,6 +57,37 @@
</b-select>
</b-field>
</transition>
<transition name="filter-item">
<b-field
v-if="hasMetadata"
:addons="false">
<label class="label">
{{ $i18n.getHelperTitle('tainacan-relationship', 'display_related_item_metadata') }}
<help-button
:title="$i18n.getHelperTitle('tainacan-relationship', 'display_related_item_metadata')"
:message="$i18n.getHelperMessage('tainacan-relationship', 'display_related_item_metadata')"/>
</label>
<div :class="'displayed-metadata-options' + (metadata.length > 5 ? ' has-more-than-5-metadata' : '')">
<b-checkbox
native-value="thumbnail"
name="metadata_type_relationship[display_related_item_metadata]"
@input="emitValues()"
v-model="displayRelatedItemMetadata">
{{ $i18n.get('label_thumbnail') }}
</b-checkbox>
<b-checkbox
v-for="(metadatumOption, index) in metadata"
:key="index"
:native-value="metadatumOption.id"
name="metadata_type_relationship[display_related_item_metadata]"
@input="emitValues()"
v-model="displayRelatedItemMetadata"
:disabled="metadatumOption.id == modelSearch">
{{ metadatumOption.name }}
</b-checkbox>
</div>
</b-field>
</transition>
<b-field
:addons="false"
@ -97,7 +130,8 @@
modelDisplayInRelatedItems: 'no',
modelSearch:'',
collectionType: '',
collectionMessage: ''
collectionMessage: '',
displayRelatedItemMetadata: []
}
},
computed: {
@ -124,28 +158,30 @@
}
},
modelSearch( value ){
this.modelSearch = value;
if ( !this.displayRelatedItemMetadata.includes(value) )
this.displayRelatedItemMetadata.push(value);
this.emitValues();
}
},
created(){
this.fetchCollections().then(() => {
if( this.collection_id && this.collection_id !== '' ){
this.collection = this.collection_id;
} else if ( this.value ) {
this.collection = this.value.collection_id;
}
});
this.fetchCollections().then(() => {
if( this.collection_id && this.collection_id !== '' ){
this.collection = this.collection_id;
} else if ( this.value ) {
this.collection = this.value.collection_id;
}
});
this.modelDisplayInRelatedItems = this.value && this.value.display_in_related_items ? this.value.display_in_related_items : 'no';
this.displayRelatedItemMetadata = this.value && this.value.display_related_item_metadata && Array.isArray(this.value.display_related_item_metadata) ? this.value.display_related_item_metadata : [];
this.modelDisplayInRelatedItems = this.value && this.value.display_in_related_items ? this.value.display_in_related_items : 'no';
},
methods:{
methods: {
setErrorsAttributes( type, message ){
this.collectionType = type;
this.collectionType = message;
},
fetchCollections(){
return axios.get('/collections?nopaging=1')
async fetchCollections(){
return await axios.get('/collections?nopaging=1')
.then(res => {
const collections = res.data;
@ -169,14 +205,13 @@
this.metadata = [];
for (let metadatum of metadata) {
if (metadatum.metadata_type_object.component !== 'tainacan-relationship' && metadatum.metadata_type_object.component !== 'tainacan-compound') {
this.metadata.push( metadatum );
this.hasMetadata = true;
this.checkMetadata()
this.checkMetadata();
}
}
if (this.metadata.length <= 0) {
this.$buefy.toast.open({
duration: 4000,
@ -225,7 +260,8 @@
this.$emit('input',{
collection_id: this.collection,
search: this.modelSearch,
display_in_related_items: this.modelDisplayInRelatedItems
display_in_related_items: this.modelDisplayInRelatedItems,
display_related_item_metadata: this.displayRelatedItemMetadata
});
}
}
@ -239,4 +275,11 @@
.switch.is-small {
margin-top: -0.5em;
}
.displayed-metadata-options.has-more-than-5-metadata {
max-height: 125px;
overflow-y: auto;
border: 1px solid var(--tainacan-gray2);
overflow-x: hidden;
padding: 6px 12px;
}
</style>

View File

@ -1,60 +1,118 @@
<template>
<div :class="{ 'is-flex is-flex-wrap-wrap': itemMetadatum.metadatum.multiple != 'yes' || maxtags != undefined }">
<b-taginput
expanded
:disabled="disabled"
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
<b-tabs
size="is-small"
icon="magnify"
:value="selected"
@input="onInput"
@blur="onBlur"
:data="options"
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : 1)"
autocomplete
:remove-on-keys="[]"
:dropdown-position="isLastMetadatum ? 'top' :'auto'"
attached
:placeholder="$i18n.get('instruction_type_existing_item')"
:loading="isLoading"
:aria-close-label="$i18n.get('remove_value')"
:class="{'has-selected': selected != undefined && selected != []}"
field="label"
@typing="search"
check-infinite-scroll
@infinite-scroll="searchMore"
:has-counter="false">
<template slot-scope="props">
<div class="media">
animated
v-model="activeTab">
<b-tab-item :label="$i18n.get('label_insert_items')">
<b-taginput
expanded
:disabled="disabled"
:id="relationshipInputId"
size="is-small"
icon="magnify"
:value="selected"
@input="onInput"
@blur="onBlur"
@add="onAdd"
@remove="onRemove"
:data="options"
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : 1)"
autocomplete
:remove-on-keys="[]"
:dropdown-position="isLastMetadatum ? 'top' :'auto'"
attached
:placeholder="$i18n.get('instruction_type_existing_item')"
:loading="isLoading"
:aria-close-label="$i18n.get('remove_value')"
:class="{'has-selected': selected != undefined && selected != []}"
field="label"
@typing="search"
check-infinite-scroll
@infinite-scroll="searchMore"
:has-counter="false">
<template slot-scope="props">
<div
v-if="!isDisplayingRelatedItemMetadata"
class="media">
<div
v-if="props.option.img"
class="media-left">
<img
width="28"
:src="props.option.img">
</div>
<div class="media-content">
{{ props.option.label }}
</div>
</div>
<div
v-else
class="tainacan-relationship-group">
<div v-html="props.option.valuesAsHtml" />
</div>
</template>
<template
v-if="!isLoading"
slot="empty">
{{ $i18n.get('info_no_item_found') }}
</template>
<template
v-if="currentUserCanEditItems && !($route && $route.query.iframemode)"
slot="footer">
<a @click="editItemModalOpen = true">
{{ $i18n.get('label_crate_new_item') + ' "' + searchQuery + '"' }}
</a>
</template>
</b-taginput>
</b-tab-item>
<b-tab-item
v-if="itemMetadatum"
style="min-height: 56px;"
:label="( itemMetadatum.value.length == 1 || itemMetadatum.metadatum.multiple != 'yes' ) ? $i18n.get('label_selected_item') : ( $i18n.get('label_selected_items') + ' (' + itemMetadatum.value.length + ')' )">
<div class="tainacan-relationship-results-container">
<div
v-if="props.option.img"
class="media-left">
<img
width="28"
:src="props.option.img">
v-if="itemMetadatum.value && itemMetadatum.value.length"
class="tainacan-relationship-group">
<div
v-for="(itemValue, index) of selected"
:key="index"
style="position: relative;">
<div v-html="itemValue.valuesAsHtml" />
<a
v-if="currentUserCanEditItems && $route && !$route.query.iframemode"
@click="editSelected(itemValue.value)"
class="relationship-value-button--edit">
<span class="icon">
<i class="tainacan-icon tainacan-icon-edit" />
</span>
</a>
<a
@click="removeFromSelected(itemValue.value)"
class="relationship-value-button--remove">
<span class="icon">
<i class="tainacan-icon tainacan-icon-close" />
</span>
</a>
<span
v-if="index < selected.length - 1"
class="multivalue-separator"> | </span>
</div>
</div>
<div class="media-content">
{{ props.option.label }}
<div v-else>
<p
class="has-text-gray"
style="font-size: 0.875em;">
{{ $i18n.get('info_no_item_found') }}
</p>
</div>
</div>
</template>
<template
v-if="!isLoading"
slot="empty">
{{ $i18n.get('info_no_item_found') }}
</template>
<template
v-if="currentUserCanEditItems && !($route && $route.query.iframemode)"
slot="footer">
<a @click="createNewItemModal = true">
{{ $i18n.get('label_crate_new_item') + ' "' + searchQuery + '"' }}
</a>
</template>
</b-taginput>
</b-tab-item>
</b-tabs>
<a
v-if="currentUserCanEditItems && itemMetadatum.item && itemMetadatum.item.id && (maxMultipleValues === undefined || maxMultipleValues > selected.length)"
:disabled="!$route || $route.query.iframemode"
@click="createNewItemModal = !createNewItemModal"
@click="editItemModalOpen = !editItemModalOpen"
class="add-link">
<span class="icon is-small">
<i class="tainacan-icon has-text-secondary tainacan-icon-add"/>
@ -63,15 +121,14 @@
</a>
<b-modal
:width="1200"
:active.sync="createNewItemModal"
custom-class="tainacan-modal">
:active.sync="editItemModalOpen"
:custom-class="'tainacan-modal' + (collection && collection.id ? ' tainacan-modal-item-edition--collection-' + collection.id : '')">
<iframe
:id="newItemFrame"
:id="relationshipInputId + '_item-edition-modal'"
width="100%"
style="height: 85vh"
:src="adminFullURL + $routerHelper.getNewItemPath(collectionId) + '?iframemode=true&newmetadatumid=' + itemMetadatum.metadatum.metadata_type_options.search + '&newitemtitle=' + searchQuery" />
:src="itemModalSrc" />
</b-modal>
</div>
</template>
@ -80,7 +137,7 @@
import { mapGetters } from 'vuex';
import qs from 'qs';
export default {
export default {
props: {
itemMetadatum: Object,
maxtags: undefined,
@ -95,11 +152,14 @@
isLoading: false,
collectionId: '',
searchQuery: '',
editingItemId: '',
totalItems: 0,
page: 1,
createNewItemModal: false,
activeTab: 0,
editItemModalOpen: false,
adminFullURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#',
currentUserCanEditItems: false
currentUserCanEditItems: false,
selectedValuesAsHtml: []
}
},
computed: {
@ -109,30 +169,57 @@
maxMultipleValues() {
return (this.itemMetadatum && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.cardinality && !isNaN(this.itemMetadatum.metadatum.cardinality)) ? this.itemMetadatum.metadatum.cardinality : undefined;
},
itemModalSrc() {
if (this.editingItemId)
return this.adminFullURL + this.$routerHelper.getItemEditPath(this.collectionId, this.editingItemId) + '?iframemode=true';
else
return this.adminFullURL + this.$routerHelper.getNewItemPath(this.collectionId) + '?iframemode=true&newmetadatumid=' + this.itemMetadatum.metadatum.metadata_type_options.search + '&newitemtitle=' + this.searchQuery;
},
relationshipInputId() {
if (this.itemMetadatum && this.itemMetadatum.metadatum)
return 'tainacan-item-metadatum_id-' + this.itemMetadatum.metadatum.id + (this.itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + this.itemMetadatum.parent_meta_id) : '');
else
return '';
},
isDisplayingRelatedItemMetadata() {
return this.itemMetadatum &&
this.itemMetadatum.metadatum &&
this.itemMetadatum.metadatum.metadata_type_options &&
this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata &&
this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.length &&
this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.length > 1;
}
},
watch: {
createNewItemModal() {
if (this.createNewItemModal)
window.addEventListener('message', this.createNewItemFromModal, false);
editItemModalOpen() {
if (this.editItemModalOpen)
window.addEventListener('message', this.updateItemFromModal, false);
else
window.removeEventListener('message', this.createNewItemFromModal);
window.removeEventListener('message', this.updateItemFromModal);
}
},
created() {
this.collectionId = ( this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.collection_id ) ? this.itemMetadatum.metadatum.metadata_type_options.collection_id : '';
if (this.itemMetadatum.value && (Array.isArray( this.itemMetadatum.value ) ? this.itemMetadatum.value.length > 0 : true )) {
let query = qs.stringify({ postin: ( Array.isArray( this.itemMetadatum.value ) ) ? this.itemMetadatum.value : [ this.itemMetadatum.value ] });
query += this.itemMetadatum.metadatum.metadata_type_options.search ? '&fetch_only_meta=' + this.itemMetadatum.metadatum.metadata_type_options.search : '';
axios.get('/collection/' + this.collectionId + '/items?' + query + '&nopaging=1&fetch_only=title,document_mimetype,thumbnail&order=asc')
let query = [];
query['postin'] = Array.isArray( this.itemMetadatum.value ) ? this.itemMetadatum.value : [ this.itemMetadatum.value ];
query['nopaging'] = 1;
query['order'] = 'asc';
query['fetch_only'] = 'title,document_mimetype,thumbnail';
query['fetch_only_meta'] = this.isDisplayingRelatedItemMetadata ? (this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.filter(metadatumId => metadatumId !== 'thumbnail') + '') : (this.itemMetadatum.metadatum.metadata_type_options.search ? this.itemMetadatum.metadatum.metadata_type_options.search : '');
axios.get('/collection/' + this.collectionId + '/items?' + qs.stringify(query) )
.then( res => {
if (res.data.items) {
for (let item of res.data.items)
for (let item of res.data.items) {
this.selected.push({
label: this.getItemLabel(item),
value: item.id,
valuesAsHtml: this.getItemMetadataValuesAsHtml(item),
img: this.$thumbHelper.getSrc(item['thumbnail'], 'tainacan-small', item.document_mimetype)
});
}
}
})
.catch(error => {
@ -194,12 +281,14 @@
.then( res => {
if (res.data.items) {
for (let item of res.data.items)
for (let item of res.data.items) {
this.options.push({
label: this.getItemLabel(item),
value: item.id,
valuesAsHtml: this.getItemMetadataValuesAsHtml(item),
img: this.$thumbHelper.getSrc(item['thumbnail'], 'tainacan-small', item.document_mimetype)
})
});
}
}
if (res.headers['x-wp-total'])
this.totalItems = res.headers['x-wp-total'];
@ -275,8 +364,8 @@
} else {
query['search'] = search;
}
query['fetch_only'] = 'title,thumbnail';
query['fetch_only_meta'] = this.itemMetadatum.metadatum.metadata_type_options.search;
query['fetch_only'] = 'title,thumbnail,document_mimetype';
query['fetch_only_meta'] = this.isDisplayingRelatedItemMetadata ? (this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.filter(metadatumId => metadatumId !== 'thumbnail') + '') : (this.itemMetadatum.metadatum.metadata_type_options.search ? this.itemMetadatum.metadatum.metadata_type_options.search : '');
query['perpage'] = 12;
query['paged'] = this.page;
query['order'] = 'asc';
@ -286,33 +375,200 @@
return qs.stringify(query);
},
createNewItemFromModal(event) {
updateItemFromModal(event) {
const message = event.message ? 'message' : 'data';
const data = event[message];
if (data.type == 'itemCreationMessage') {
this.createNewItemModal = false;
if (data.type == 'itemEditionMessage') {
this.editItemModalOpen = false;
if (data.itemId) {
this.searchQuery = '';
this.selected.push({
label: data.itemTitle,
value: data.itemId,
img: data.itemThumbnail ? data.itemThumbnail : ''
});
this.onInput(this.selected);
// An item is being edited from the modal
if (this.editingItemId) {
if (data.item && data.item.id) {
const existingItemIndex = this.selected.findIndex(anItemValue => anItemValue.value == data.item.id);
if (existingItemIndex >= 0) {
this.selected.splice(existingItemIndex, 1, {
label: this.getItemLabel(data.item),
value: data.item.id,
valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item),
img: data.item.thumbnail ? data.item.thumbnail : ''
});
}
this.onInput(this.selected);
}
this.editingItemId = '';
// An item is being created from the modal
} else {
if (data.item && data.item.id) {
this.searchQuery = '';
this.selected.push({
label: this.getItemLabel(data.item),
value: data.item.id,
valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item),
img: data.item.thumbnail ? data.item.thumbnail : ''
});
this.onInput(this.selected);
}
}
}
}
},
getItemMetadataValuesAsHtml(item) {
let valuesAsHtml = '';
valuesAsHtml += `<div class="tainacan-relationship-metadatum" data-item-id="${ item.id }">
<div class="tainacan-relationship-metadatum-header">`;
if (this.isDisplayingRelatedItemMetadata && this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.indexOf('thumbnail') >= 0)
valuesAsHtml += `<img src="${ this.$thumbHelper.getSrc(item['thumbnail'], 'tainacan-small', item.document_mimetype) }" class="attachment-tainacan-small size-tainacan-small" alt="${ item.thumbnail_alt }" loading="lazy" width="40" height="40">`;
valuesAsHtml += `<h4 class="label">
${ this.getItemLabel(item) }
</h4>`;
valuesAsHtml += `</div>`;
Object.values(item.metadata).forEach(metadatumValue => {
if (
metadatumValue.id != this.itemMetadatum.metadatum.metadata_type_options.search &&
this.itemMetadatum.metadatum.metadata_type_options.display_related_item_metadata.indexOf(metadatumValue.id) >= 0 &&
metadatumValue.value_as_html
) {
valuesAsHtml += `<div class="tainacan-metadatum">
<h5 class="label">
${ metadatumValue.name }
</h5>
<p>
${ metadatumValue.value_as_html }
</p>
</div>`;
}
});
valuesAsHtml += `</div>`;
return valuesAsHtml;
},
editSelected(itemId) {
this.editingItemId = itemId;
this.editItemModalOpen = true;
},
removeFromSelected(itemId) {
const indexOfRemovedItem = this.selected.findIndex(itemValue => itemValue.value == itemId);
if (indexOfRemovedItem >= 0) {
this.selected.splice(indexOfRemovedItem, 1);
this.onInput(this.selected);
}
}
}
}
</script>
<style scoped>
<style lang="scss" scoped>
div.is-flex {
justify-content: flex-start;
}
.add-link {
font-size: 0.75em;
}
.b-tabs {
margin-bottom: 0;
width: 100%;
}
/deep/ .b-tabs .tab-content {
padding: 0.5em 0px !important;
}
/deep/ .tabs {
margin-bottom: 0 !important;
ul {
padding: 0;
}
}
/deep/ .tainacan-relationship-results-container {
border: 1px solid var(--tainacan-gray1);
background-color: var(--tainacan-white);
margin-top: calc(-1 * (0.5em + 1px));
margin-bottom: calc(-1 * (0.5em + 1px));
display: flex;
overflow: auto;
padding: 12px;
max-height: 40vh;
transition: height 0.5s ease, min-height 0.5s ease;
.tainacan-relationship-group {
padding-bottom: 12px;
.tainacan-relationship-metadatum {
.tainacan-metadatum .label {
font-size: 0.75em;
}
a {
pointer-events: auto;
}
.tainacan-relationship-metadatum-header {
padding-right: 64px;
.label{
font-size: 0.875em;
}
}
}
&>div>.multivalue-separator {
display: block;
max-height: 1px;
width: calc(100% - 40px);
background: var(--tainacan-gray2);
content: none;
color: transparent;
margin: 0.5em 0 0.5em 40px;
}
}
}
/deep/ .tainacan-relationship-group {
width: 100%;
.tainacan-relationship-metadatum {
.label {
font-size: 1em;
}
a {
pointer-events: none;
}
p {
font-size: 0.875em;
margin-bottom: 0;
margin-top: 0;
}
}
.tainacan-relationship-metadatum-header {
.label {
font-size: 1.125em;
font-weight: normal;
}
img {
max-width: 28px;
max-height: 28px;
margin-right: 10px;
}
}
.relationship-value-button--edit,
.relationship-value-button--remove {
position: absolute;
top: 0px;
}
}
/deep/ .relationship-value-button--edit,
/deep/ .relationship-value-button--remove {
right: 4px;
background-color: var(--tainacan-white);
border-radius: 100%;
padding: 2px;
&:hover {
background-color: var(--tainacan-gray0);
}
}
/deep/ .relationship-value-button--edit {
right: 34px;
}
</style>

View File

@ -59,6 +59,10 @@ class Relationship extends Metadata_Type {
'title' => __( 'Related Metadatum', 'tainacan' ),
'description' => __( 'Select the metadata to use as search criteria in the target collection and as a label when representing the relationship', 'tainacan' ),
],
'display_related_item_metadata' => [
'title' => __( 'Displayed related item metadata', 'tainacan' ),
'description' => __( 'Select the metadata that will be displayed from the related item.', 'tainacan' ),
],
'display_in_related_items' => [
'title' => __( 'Display in "Items related to this"', 'tainacan' ),
'description' => __( 'Include items linked by this metadata on a list of related items.', 'tainacan' ),
@ -119,8 +123,24 @@ class Relationship extends Metadata_Type {
$readable_option_value = $option_value;
break;
case 'display_related_item_metadata':
if ( is_array($option_value) ) {
$metadata_list = [];
foreach($option_value as $metadata_id) {
if ($metadata_id == 'thumbnail') {
$metadata_list[] = __('Thumbnail', 'tainacan');
} else {
$metadata = \tainacan_metadata()->fetch( (int) $metadata_id );
if ( $metadata ) $metadata_list[] = $metadata;
}
}
$readable_option_value = implode(", ", $metadata_list);
}
break;
default:
$readable_option_value = $option_value;
$readable_option_value = is_string($option_value) ? $option_value : json_encode($option_value);
}
$options_as_html .= '<div class="value">' . $readable_option_value . '</div></div>';
}
@ -163,13 +183,13 @@ class Relationship extends Metadata_Type {
* @param Item_Metadata_Entity $item_metadata
* @return string The HTML representation of the value, containing one or multiple items names, linked to the item page
*/
public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) {
public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) {
$value = $item_metadata->get_value();
$search_meta_id = $this->get_option('search');
$display_metas = $this->get_option('display_related_item_metadata');
$return = '';
if ( $item_metadata->is_multiple() ) {
$count = 1;
$total = sizeof($value);
$prefix = $item_metadata->get_multivalue_prefix();
$suffix = $item_metadata->get_multivalue_suffix();
$separator = $item_metadata->get_multivalue_separator();
@ -178,19 +198,11 @@ class Relationship extends Metadata_Type {
try {
$Tainacan_Items = \Tainacan\Repositories\Items::get_instance();
$item = $Tainacan_Items->fetch( (int) $item_id);
$count++;
if ( $item instanceof \Tainacan\Entities\Item ) {
$return .= $prefix;
$return .= $this->get_item_html($item);
$return .= $suffix;
if ( $count <= $total ) {
$return .= $separator;
}
if ( $this->can_display_item($item) ) {
$return .= empty($return)
? ($prefix . $this->get_item_html($item, $search_meta_id, $display_metas) . $suffix)
: ($separator . $prefix . $this->get_item_html($item, $search_meta_id, $display_metas) . $suffix);
}
} catch (\Exception $e) {
// item not found
}
@ -198,55 +210,126 @@ class Relationship extends Metadata_Type {
} else {
try {
$item = new \Tainacan\Entities\Item($value);
if ( $item instanceof \Tainacan\Entities\Item ) {
$return .= $this->get_item_html($item);
if ( $this->can_display_item($item) ) {
$return .= $this->get_item_html($item, $search_meta_id, $display_metas);
}
} catch (\Exception $e) {
// item not found
}
}
if(!empty($display_metas) && is_array($display_metas) && count($display_metas) > 1) {
return "<div class='tainacan-relationship-group'>{$return}</div>";
}
return $return;
}
private function can_display_item($item) {
return (
$item instanceof \Tainacan\Entities\Item && (
is_user_logged_in() ||
(
\is_post_status_viewable( $item->get_status() ) &&
\is_post_status_viewable( $item->get_collection()->get_status() )
)
)
);
}
private function get_item_html($item, $search_meta_id, $display_metas) {
$return = '';
$id = $item->get_id();
if(!empty($display_metas) && is_array($display_metas) && count($display_metas) > 1) {
$has_thumbnail = array_search('thumbnail', $display_metas);
$thumbnail_id = false;
if($has_thumbnail !== false) {
unset($display_metas[$has_thumbnail]);
$thumbnail_id = $item->get__thumbnail_id();
}
$args = ['post__in' => $display_metas];
$metadatum = $item->get_metadata($args);
$metadata_value = [];
foreach ( $metadatum as $item_meta_id => $item_meta ) {
if ( $item_meta instanceof \Tainacan\Entities\Item_Metadata_Entity && $item_meta->get_value_as_html() != '' ) {
$meta_id = $item_meta->get_metadatum()->get_id();
$as_header = $search_meta_id == $meta_id ? $this->get_item_link($item, $search_meta_id) : false;
$html = $this->get_meta_html($item_meta, $item, $as_header, $thumbnail_id);
if($as_header === false) {
$metadata_value[] = $html;
} else {
array_unshift($metadata_value, $html);
}
}
$return = implode("\n", $metadata_value);
}
$return = "<div class='tainacan-relationship-metadatum' data-item-id='$id'>{$return}</div>";
} else if ( $id && $search_meta_id ) {
$as_link = $this->get_item_link($item, $search_meta_id);
$return = "$as_link";
}
return $return;
}
private function get_item_html($item) {
private function get_item_link($item, $search_meta_id) {
$return = '';
$id = $item->get_id();
$search_meta_id = $this->get_option('search');
if ( $id && $search_meta_id ) {
$link = get_permalink( (int) $id );
$search_meta_id = $this->get_option('search');
$metadatum = \Tainacan\Repositories\Metadata::get_instance()->fetch((int) $search_meta_id);
$label = '';
if ($metadatum instanceof \Tainacan\Entities\Metadatum) {
$item_meta = new \Tainacan\Entities\Item_Metadata_Entity($item, $metadatum);
$label = $item_meta->get_value_as_string();
}
if ( empty($label) ) {
$label = $item->get_title();
}
if (is_string($link)) {
if ( is_user_logged_in() ||
\is_post_status_viewable( $item->get_status() ) &&
\is_post_status_viewable($item->get_collection()->get_status()) ) {
$return = "<a data-linkto='item' data-id='$id' href='$link'>";
$return.= $label;
$return .= "</a>";
} else {
$return.= $label;
}
$link = get_permalink( (int) $id );
$metadatum = \Tainacan\Repositories\Metadata::get_instance()->fetch((int) $search_meta_id);
$value = '';
if ($metadatum instanceof \Tainacan\Entities\Metadatum) {
$item_meta = new \Tainacan\Entities\Item_Metadata_Entity($item, $metadatum);
$value = $item_meta->get_value_as_string();
}
if ( empty($value) ) {
$value = $item->get_title();
}
if (is_string($link)) {
$return = "<a data-linkto='item' data-id='$id' href='$link'>$value</a>";
}
return $return;
}
private function get_item_thumbnail($thumbnail_id, $item) {
if($thumbnail_id !== false && !empty($thumbnail_id)){
return \wp_get_attachment_image($thumbnail_id, 'tainacan-small');
}
$media_type = $item->get_document_mimetype();
$placeholder_image = '<img src="' . \tainacan_get_the_mime_type_icon($media_type, 'tainacan-small') . '" />';
return $placeholder_image;
}
private function get_meta_html(\Tainacan\Entities\Item_Metadata_Entity $meta, \Tainacan\Entities\Item $item, $value_link = false, $thumbnail_id = false) {
$html = '';
if ($meta instanceof \Tainacan\Entities\Item_Metadata_Entity && !empty($meta->get_value_as_html())) {
ob_start();
if ($value_link) {
?>
<div class="tainacan-relationship-metadatum-header">
<?php echo $this->get_item_thumbnail($thumbnail_id, $item); ?>
<h4 class="label">
<?php echo $value_link; ?>
</h4>
</div>
<?php
} else {
?>
<div class="tainacan-metadatum">
<h5 class="label">
<?php echo $meta->get_metadatum()->get_name(); ?>
</h5>
<p>
<?php echo ($value_link === false ? $meta->get_value_as_html() : $value_link); ?>
</p>
</div>
<?php
}
$html = ob_get_contents();
ob_end_clean();
}
return $return;
return $html;
}
/**

View File

@ -1,9 +1,6 @@
<template>
<b-field
:class="{
'has-collapses-hidden': hideCollapses,
'hightlighted-metadatum': isHighlightedMetadatum
}"
:class="metadatumFormClasses"
:ref="isHighlightedMetadatum ? 'hightlighted-metadatum': 'null'"
:addons="false"
:message="errorMessage"
@ -150,6 +147,13 @@
isTextInputComponent() {
const array = ['tainacan-relationship','tainacan-taxonomy', 'tainacan-compound', 'tainacan-user'];
return !(array.indexOf(this.metadatumComponent) >= 0 );
},
metadatumFormClasses() {
return '' +
(this.hideCollapses ? ' has-collapses-hidden' : '') +
(this.isHighlightedMetadatum ? ' hightlighted-metadatum' : '') +
(this.metadatumComponent ? ' tainacan-metadatum-component--' + this.metadatumComponent : '') +
(this.itemMetadatum && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.id ? ' tainacan-metadatum-id--' + this.itemMetadatum.metadatum.id : '');
}
},
created() {

View File

@ -178,7 +178,7 @@
<style scoped>
.add-new-term {
margin: 6px 0;
margin: 3px 0;
font-size: 0.75em;
}
</style>

View File

@ -524,7 +524,7 @@ export default {
h4 {
color: var(--tainacan-heading-color);
font-size: 1em;
font-size: 1em !important;
font-weight: 500;
padding: 0em 0.5em;
margin: 0;

View File

@ -5,9 +5,7 @@
animated
@input="fetchSelectedLabels()"
v-model="activeTab">
<b-tab-item
style="margin: 0 -0.75rem;"
:label="isTaxonomy ? $i18n.get('label_all_terms') : $i18n.get('label_all_metadatum_values')">
<b-tab-item :label="isTaxonomy ? $i18n.get('label_all_terms') : $i18n.get('label_all_metadatum_values')">
<!-- Search input -->
<b-field class="is-clearfix tainacan-checkbox-search-section">
@ -810,9 +808,9 @@
display: none;
visibility: hidden;
}
.tab-content {
/deep/ .tab-content {
transition: height 0.2s ease;
padding: 0.5em 20px !important;
padding: 0.5em 0px !important;
}
// In theme, the bootstrap removes the style of <a> without href

View File

@ -190,8 +190,25 @@
<div
v-if="(isRepositoryLevel && $userCaps.hasCapability('tnc_rep_edit_filters') || !isRepositoryLevel)"
class="column available-metadata-area">
<div class="tainacan-form sub-header">
<h3>{{ $i18n.get('label_available_metadata') }}</h3>
<template v-if="availableMetadata && availableMetadata.length > 5 && !isLoadingMetadatumTypes">
<b-field class="header-item">
<b-input
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
v-model="metadatumNameFilterString"
icon="magnify"
size="is-small"
icon-right="close-circle"
icon-right-clickable
@icon-right-click="metadatumNameFilterString = ''" />
</b-field>
</template>
</div>
<div class="field" >
<h3 class="label"> {{ $i18n.get('label_available_metadata') }}</h3>
<draggable
@change="handleChangeOnMetadata"
v-if="availableMetadata.length > 0 && !isLoadingMetadatumTypes"
@ -209,6 +226,7 @@
'disabled-metadatum': isSelectingFilterType
}"
v-if="metadatum.enabled"
v-show="metadatumNameFilterString == '' || metadatum.name.toString().toLowerCase().indexOf(metadatumNameFilterString.toString().toLowerCase()) >= 0"
:key="index"
@click.prevent="addMetadatumViaButton(metadatum, index)">
<span
@ -409,7 +427,8 @@ export default {
columnsTopY: 0,
filtersSearchCancel: undefined,
metadataSearchCancel: undefined,
filterNameFilterString: ''
filterNameFilterString: '',
metadatumNameFilterString: ''
}
},
computed: {
@ -902,7 +921,8 @@ export default {
.active-filters-area {
font-size: 0.875em;
margin-left: -0.8em;
padding-right: 3em;
padding-right: 1em;
padding-top: 1em;
min-height: 330px;
@media screen and (max-width: 769px) {
@ -1043,11 +1063,10 @@ export default {
}
.available-metadata-area {
padding: 10px 0px 10px 10px;
padding: 0px 0px 10px 10px;
margin: 0;
max-width: 500px;
min-width: 20.8333333%;
font-size: 0.875em;
max-width: 600px;
min-width: 41.66666667%;
@media screen and (max-width: 769px) {
max-width: 100%;
@ -1066,6 +1085,12 @@ export default {
font-weight: 500;
}
&>.field {
font-size: 0.875em;
padding-right: 1em;
padding-left: 1em;
}
.available-metadatum-item {
padding: 0.6em;
margin: 4px 4px 4px 1.2em;

View File

@ -817,7 +817,7 @@ export default {
.active-metadata-area {
font-size: 0.875em;
margin-left: -0.8em;
padding-right: 3em;
padding-right: 1em;
min-height: 330px;
@media screen and (max-width: 769px) {

View File

@ -24,7 +24,7 @@
<div class="tainacan-form">
<div class="columns">
<div class="column is-7">
<div class="column is-7">
<!-- Hook for extra Form options -->
<template
@ -173,11 +173,18 @@
<div
:class="{
'metadata-type-textarea': itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-textarea',
'metadata-type-compound': itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-compound'
'metadata-type-compound': itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-compound',
'metadata-type-relationship': itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-relationship'
}"
class="content">
<component
:is="itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-compound' ? 'div' : 'p'"
:is="
itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-compound' ||
(itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-relationship' &&
itemMetadatum.metadatum.metadata_type_object.options &&
itemMetadatum.metadatum.metadata_type_object.options.display_related_item_metadata &&
itemMetadatum.metadatum.metadata_type_object.options.display_related_item_metadata.length > 1
) ? 'div' : 'p'"
v-html="itemMetadatum.value_as_html != '' ? itemMetadatum.value_as_html : `<p><span class='has-text-gray is-italic'>` + $i18n.get('label_value_not_provided') + `</span></p>`"/>
</div>
</div>
@ -348,8 +355,8 @@
<!-- Hook for extra Form options -->
<template
v-if="formHooks != undefined &&
formHooks['view-item'] != undefined &&
formHooks['view-item']['end-left'] != undefined">
formHooks['view-item'] != undefined &&
formHooks['view-item']['end-left'] != undefined">
<div
id="view-item-end-left"
class="form-hook-region"
@ -658,6 +665,10 @@
margin-right: 18px;
}
}
p:empty {
display: none;
visibility: hidden;
}
}
}

View File

@ -36,7 +36,7 @@ button.link-style:active {
background: var(--tainacan-secondary) !important;
color: var(--tainacan-white) !important;
}
&.is-primary, &:hover, &.is-primary:focus {
&.is-primary, &.is-primary:hover, &.is-primary:focus {
background: var(--tainacan-primary) !important;
color: var(--tainacan-white) !important;
}
@ -47,6 +47,11 @@ button.link-style:active {
&.is-white, &.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
background-color: transparent !important;
}
&.is-loading, &.is-loading:hover, &.is-loading:focus,
&.is-loading.is-success, &.is-loading.is-success:hover, &.is-loading.is-success:focus,
&.is-loading.is-secondary, &.is-loading.is-secondary:hover, &.is-loading.is-secondary:focus {
color: transparent !important;
}
&:active {
-webkit-transform: none !important;
transform: none !important;
@ -96,6 +101,7 @@ button.link-style:active {
kbd {
padding: 0.25rem 0.5rem 0.25rem 0.35rem;
background: radial-gradient(var(--tainacan-white, #ffffff), var(--tainacan-gray1, #f2f2f2) );
color: inherit;
display: inline-block;
position: relative;
top: -0.15rem;

View File

@ -149,6 +149,11 @@
background-color: transparent !important;
color: var(--tainacan-black) !important;
}
.button.is-loading, .button.is-loading:hover, .button.is-loading:focus,
.button.is-loading.is-success, .button.is-loading.is-success:hover, .button.is-loading.is-success:focus,
.button.is-loading.is-secondary, .button.is-loading.is-secondary:hover, .button.is-loading.is-secondary:focus {
color: transparent !important;
}
a,
a:hover,

View File

@ -20,6 +20,7 @@
h3 {
font-size: 1em;
padding-top: 0;
color: var(--tainacan-heading-color);
margin-bottom: 1em;
}

View File

@ -29,7 +29,7 @@
align-items: flex-end;
h1, h2 {
font-size: 1.25em;
font-size: 1.25em !important;
font-weight: normal;
font-weight: 500;
color: var(--tainacan-heading-color);
@ -39,12 +39,12 @@
margin-bottom: 0px;
margin: 0 auto 0 0;
}
a.back-link{
a.back-link {
font-weight: 500;
float: right;
margin-top: 5px;
}
hr{
hr {
margin: 3px 0 4px 0;
height: 1px;
background-color: var(--tainacan-secondary);

View File

@ -229,7 +229,7 @@
.tainacan-compound-metadatum .label {
text-align: left;
margin-bottom: 0.25em;
font-size: 1em;
font-size: 1em !important;
color: var(--tainacan-info-color);
}
.tainacan-compound-metadatum p {
@ -246,6 +246,49 @@
color: transparent;
margin: 1em auto 1em -0.875em;
}
}
.tainacan-relationship-group {
text-align: left;
.tainacan-relationship-metadatum {
text-align: left;
.tainacan-relationship-metadatum-header {
text-align: left;
display: flex;
align-items: center;
img {
margin-right: 12px;
max-width: 28px;
max-height: 28px;
}
.label {
font-weight: normal;
font-size: 1em !important;
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
margin-right: 0;
}
}
.tainacan-metadatum {
text-align: left;
margin-left: 40px;
.label {
color: var(--tainacan-gray4);
font-size: 1em !important;
line-height: 1em;
margin-top: 8px;
margin-bottom: 2px;
}
}
}
&>.multivalue-separator {
display: block;
max-height: 1px;
width: calc(100% - 40px);
background: var(--tainacan-gray2);
content: none;
color: transparent;
margin: 0.5em 0 0.5em 40px;
}
}
}

View File

@ -196,6 +196,7 @@ a:hover {
}
}
// Inside one of the view modes
.metadata-value {
.tainacan-compound-group {
margin-left: 2px;
@ -220,9 +221,29 @@ a:hover {
color: transparent;
margin: 1em auto 1em -0.875em;
}
}
.tainacan-relationship-group {
.tainacan-relationship-metadatum {
.tainacan-relationship-metadatum-header {
.label {
font-size: 1em;
}
img {
max-width: 22px;
max-height: 22px;
}
}
.tainacan-metadatum {
margin-left: 40px;
font-size: 1.125em;
&>*{
font-size: 0.875em;
}
}
}
}
}
// Inside the admin item page
.metadata-type-textarea,
.metadata-type-compound {
.multivalue-separator {
@ -251,6 +272,44 @@ a:hover {
}
}
}
.tainacan-relationship-group {
.tainacan-relationship-metadatum {
.tainacan-relationship-metadatum-header {
display: flex;
align-items: center;
img {
margin-right: 12px;
max-width: 28px;
max-height: 28px;
}
.label {
font-weight: normal;
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
margin-right: 0;
}
}
.tainacan-metadatum {
margin-left: 40px;
.label {
font-size: 0.8125em;
line-height: 1em;
margin-top: 8px;
margin-bottom: 2px;
}
}
}
&>.multivalue-separator {
display: block;
max-height: 1px;
width: calc(100% - 40px);
background: var(--tainacan-gray2);
content: none;
color: transparent;
margin: 0.5em 0 0.5em 40px;
}
}
.taginput-container .input:hover {
border: none !important;
}

View File

@ -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": {

View File

@ -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>

View File

@ -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 }

View File

@ -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)
}
}
}

View File

@ -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) {

View File

@ -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 {

View File

@ -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",

View File

@ -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();

View File

@ -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>

View File

@ -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 }

View File

@ -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)
}
}
}

View File

@ -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) {

View File

@ -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,

View File

@ -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",

View File

@ -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>

View File

@ -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 }

View File

@ -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)
}
}
}

View File

@ -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) {

View File

@ -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 {

View File

@ -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",

View File

@ -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>

View File

@ -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>
};

View File

@ -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;
}
}
}

View File

@ -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",

View File

@ -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: {

View File

@ -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>
);
}
}

View File

@ -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
}

View File

@ -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 }

View File

@ -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);
}
}
}

View File

@ -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) {

View File

@ -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) {

View File

@ -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",

View File

@ -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: {

View File

@ -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' : '' }}>&nbsp;({ 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>

View File

@ -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' : '' }">
&nbsp;({{ 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>
&nbsp;({{ 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() {

View File

@ -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 }

View File

@ -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 {

View File

@ -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) {

View File

@ -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({

View File

@ -25,6 +25,7 @@ import TainacanFormItem from '../../../admin/components/metadata-types/tainacan-
import HelpButton from '../../../admin/components/other/help-button.vue';
import store from '../../../admin/js/store/store';
import { I18NPlugin, UserPrefsPlugin, RouterHelperPlugin, ConsolePlugin, StatusHelperPlugin, CommentsStatusHelperPlugin } from '../../../admin/js/admin-utilities';
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities';
export default (element) => {
function renderItemSubmissionForm() {
@ -56,6 +57,7 @@ export default (element) => {
Vue.use(ConsolePlugin, {visual: false});
Vue.use(VueTheMask);
Vue.use(CommentsStatusHelperPlugin);
Vue.use(ThumbnailHelperPlugin);
/* Registers Extra Vue Components passed to the window.tainacan_extra_components */
if (typeof window.tainacan_extra_components != "undefined") {

View File

@ -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",

View File

@ -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>

View File

@ -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>
};

View File

@ -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;
}
}
}

View File

@ -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",

View File

@ -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

View File

@ -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>
}

View File

@ -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);
}
}

View File

@ -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",

View File

@ -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>

View File

@ -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>
};

View File

@ -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;
}
}
}

View File

@ -79,7 +79,9 @@ $pswp__include-minimal-style: true !default;
.swiper-slide-metadata {
text-align: center;
font-size: 0.875em;
margin-bottom: 1em;
&.hide-name .swiper-slide-metadata__name {
display: none;
visibility: hidden;

View File

@ -225,6 +225,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_taxonomy_allow_new_terms' => __( 'Allow new terms', 'tainacan' ),
'label_selectbox_init' => __( 'Select', 'tainacan' ),
'label_insert_options' => __( 'Insert options', 'tainacan'),
'label_insert_items' => __( 'Insert items', 'tainacan'),
'label_available_terms' => __( 'Available terms', 'tainacan' ),
'label_some_available_terms' => __( 'Some available terms', 'tainacan' ),
'label_attachments' => __( 'Attachments', 'tainacan' ),
@ -410,6 +411,8 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_all_terms' => __( 'All terms', 'tainacan' ),
'label_selected_terms' => __( 'Selected terms', 'tainacan' ),
'label_selected_term' => __( 'Selected term', 'tainacan' ),
'label_selected_items' => __( 'Selected items', 'tainacan' ),
'label_selected_item' => __( 'Selected item', 'tainacan' ),
'label_all_metadatum_values' => __( 'All metadatum values', 'tainacan' ),
'label_selected_metadatum_values' => __( 'Selected metadatum values', 'tainacan' ),
/* translators: 'n.' here comes from 'number' */

View File

@ -1251,7 +1251,7 @@
margin-bottom: 40px;
h1, h2 {
font-size: 1.25em;
font-size: 1.25em !important;
font-weight: 500;
color: var(--tainacan-heading-color);
display: inline-block;

View File

@ -90,7 +90,7 @@
}
h3 {
font-size: 100%;
font-size: 100% !important;
margin-top: 0px;
}
@ -117,7 +117,7 @@
.label {
cursor: pointer;
font-size: 0.875em;
font-size: 0.875em !important;
font-weight: 500;
margin-bottom: 0.75em !important;
display: inline-flex;

View File

@ -185,6 +185,39 @@ export default {
}
}
.tainacan-table {
.tainacan-relationship-group {
.tainacan-relationship-metadatum {
display: inline-block;
.tainacan-relationship-metadatum-header {
img {
display: none;
}
.label {
font-weight: normal;
font-size: 1em !important;
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
margin-right: 0;
padding: 0;
}
}
.tainacan-metadatum {
display: none;
}
}
&>.multivalue-separator {
display: inline-block;
max-height: 100%;
width: 1px;
background: var(--tainacan-gray2);
content: none;
color: transparent;
margin: 0 6px;
}
}
}
.column-large-width {
.tainacan-compound-group {
display: inline-block;
@ -199,7 +232,8 @@ export default {
display: inline-block;
}
.label {
font-size: 1em;
font-size: 1em !important;
padding: 0;
color: var(--tainacan-info-color);
&:not(:first-child)::before {
content: ', ';
@ -225,7 +259,6 @@ export default {
}
}
.metadata-value {
.tainacan-compound-group {
margin-left: 2px;
padding-left: 0.875em;
@ -233,7 +266,7 @@ export default {
.tainacan-compound-metadatum .label {
margin-bottom: 0.25em;
font-size: 1em;
font-size: 1em !important;
color: var(--tainacan-info-color);
}
.tainacan-compound-metadatum p {
@ -249,7 +282,46 @@ export default {
color: transparent;
margin: 1em auto 1em -0.875em;
}
}
.tainacan-relationship-group {
.tainacan-relationship-metadatum {
.tainacan-relationship-metadatum-header {
display: flex;
align-items: center;
img {
margin-right: 12px;
max-width: 22px;
max-height: 22px;
}
.label {
font-weight: normal;
font-size: 1em !important;
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
margin-right: 0;
}
}
.tainacan-metadatum {
margin-left: 40px;
.label {
color: var(--tainacan-gray4);
font-size: 1em !important;
line-height: 1em;
margin-top: 8px;
margin-bottom: 2px;
}
}
}
&>.multivalue-separator {
display: block;
max-height: 1px;
width: calc(100% - 40px);
background: var(--tainacan-gray2);
content: none;
color: transparent;
margin: 0.5em 0 0.5em 40px;
}
}
}
}