diff --git a/.distignore b/.distignore
index 2ffce23e..63c30a00 100644
--- a/.distignore
+++ b/.distignore
@@ -25,3 +25,4 @@ README.md
SECURITY.md
/scripts
.babelrc
+phpcs.xml
diff --git a/Modula.php b/Modula.php
index e79eddec..2aeff51a 100644
--- a/Modula.php
+++ b/Modula.php
@@ -4,7 +4,7 @@
* Plugin URI: https://wp-modula.com/
* Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
* Author: WPChill
-* Version: 2.10.0
+* Version: 2.10.1
* Author URI: https://www.wpchill.com/
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -47,7 +47,7 @@
* @since 2.0.2
*/
-define( 'MODULA_LITE_VERSION', '2.10.0' );
+define( 'MODULA_LITE_VERSION', '2.10.1' );
define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
diff --git a/assets/js/admin/wp-modula-conditions.js b/assets/js/admin/wp-modula-conditions.js
index b9973936..69df70cd 100644
--- a/assets/js/admin/wp-modula-conditions.js
+++ b/assets/js/admin/wp-modula-conditions.js
@@ -4,10 +4,12 @@ jQuery.fn.setting_state = function (el, state) {
if (state == 'off') {
this.css('opacity', '0.5');
this.find('input, textarea, select, button').addClass('modula-no-pointer');
+ this.hide();
}
if (state == 'on') {
this.css('opacity', '1');
this.find('input, textarea, select, button').removeClass('modula-no-pointer');
+ this.show();
}
};
@@ -238,10 +240,7 @@ var modulaGalleryConditions = Backbone.Model.extend({
jQuery.each(children, function (index, item) {
var child = jQuery('[data-container="' + item + '"]');
- if (0 == value && currentRow.hasClass('modula_accordion_open')) {
- child.setting_state(this, 'off');
- child.show();
- } else if (0 == value) {
+ if (0 == value) {
child.hide();
} else {
child.setting_state( this, 'on');
@@ -251,6 +250,8 @@ var modulaGalleryConditions = Backbone.Model.extend({
if (0 != value) {
currentRow.addClass('modula_accordion_open');
+ } else {
+ currentRow.removeClass('modula_accordion_open');
}
this.enableEmail(false, wp.Modula.Settings.get('enableEmail'));
@@ -282,29 +283,21 @@ var modulaGalleryConditions = Backbone.Model.extend({
jQuery.each(children, function (index, item) {
var child = jQuery('[data-container="' + item + '"]');
-
+
if (
- (0 == value || 0 == wp.Modula.Settings.get('enableSocial')) &&
- currentRow.hasClass('modula_accordion_open')
- ) {
- child.setting_state(this, 'off');
- child.show();
- } else if (
0 == value ||
0 == wp.Modula.Settings.get('enableSocial')
) {
child.hide();
} else {
- child.css('opacity', '1');
- child
- .find('input, textarea, select, button')
- .removeAttr('disabled');
child.show();
}
});
if (1 == value && 1 == wp.Modula.Settings.get('enableSocial')) {
currentRow.addClass('modula_accordion_open');
+ } else {
+ currentRow.removeClass('modula_accordion_open');
}
},
@@ -316,22 +309,17 @@ var modulaGalleryConditions = Backbone.Model.extend({
jQuery.each(children, function (index, item) {
var child = jQuery('[data-container="' + item + '"]');
- if (0 == value && currentRow.hasClass('modula_accordion_open')) {
- child.setting_state(this, 'off');
- child.show();
- } else if (0 == value) {
+ if (0 == value) {
child.hide();
} else {
- child.css('opacity', '1');
- child
- .find('input, textarea, select, button')
- .removeAttr('disabled');
child.show();
}
});
if (1 == value) {
currentRow.addClass('modula_accordion_open');
+ } else {
+ currentRow.removeClass('modula_accordion_open');
}
},
@@ -345,24 +333,23 @@ var modulaGalleryConditions = Backbone.Model.extend({
jQuery.each(children, function (index, item) {
var child = jQuery('[data-container="' + item + '"]');
- if (1 == value && currentRow.hasClass('modula_accordion_open')) {
- child.setting_state(this, 'off');
- child.show();
- } else if (1 == value) {
+ if (1 == value) {
child.hide();
} else {
- child.css('opacity', '1');
- child.setting_state(this, 'on');
child.show();
+ child.setting_state(this, 'on');
}
});
if (1 != value) {
currentRow.addClass('modula_accordion_open');
+ }else{
+ currentRow.removeClass('modula_accordion_open');
}
},
hideCaption: function (settings, value) {
+
var rows = this.get('rows'),
currentRow = rows.filter('[data-container="hide_description"]'),
children = currentRow.data('children');
@@ -372,20 +359,18 @@ var modulaGalleryConditions = Backbone.Model.extend({
jQuery.each(children, function (index, item) {
var child = jQuery('[data-container="' + item + '"]');
- if (1 == value && currentRow.hasClass('modula_accordion_open')) {
- child.setting_state(this, 'off');
- child.show();
- } else if (1 == value) {
+ if (1 == value) {
child.hide();
} else {
- child.css('opacity', '1');
- child.setting_state(this, 'on');
child.show();
+ child.setting_state(this, 'on');
}
});
if (1 != value) {
currentRow.addClass('modula_accordion_open');
+ }else{
+ currentRow.removeClass('modula_accordion_open');
}
},
diff --git a/assets/js/admin/wp-modula-conditions.min.js b/assets/js/admin/wp-modula-conditions.min.js
index 9b65bd26..e86f0f92 100644
--- a/assets/js/admin/wp-modula-conditions.min.js
+++ b/assets/js/admin/wp-modula-conditions.min.js
@@ -1 +1 @@
-wp.Modula=void 0===wp.Modula?{}:wp.Modula,jQuery.fn.setting_state=function(t,a){"off"==a&&(this.css("opacity","0.5"),this.find("input, textarea, select, button").addClass("modula-no-pointer")),"on"==a&&(this.css("opacity","1"),this.find("input, textarea, select, button").removeClass("modula-no-pointer"))};var modulaGalleryConditions=Backbone.Model.extend({initialize:function(t){var a=jQuery(".modula-settings-container tr[data-container]"),i=jQuery(".modula-tabs .modula-tab");this.set("rows",a),this.set("tabs",i);var e=jQuery('.modula-settings-container tr[data-container="grid_image_size"] .modula-imagesizes-infos .modula-imagesize-info');this.set("imagesizes",e),this.initEvents(),this.initValues()},initEvents:function(){this.listenTo(wp.Modula.Settings,"change:type",this.changedType),this.listenTo(wp.Modula.Settings,"change:effect",this.changedEffect),this.listenTo(wp.Modula.Settings,"change:lightbox",this.changedLightbox),this.listenTo(wp.Modula.Settings,"change:enableSocial",this.enableSocial),this.listenTo(wp.Modula.Settings,"change:enableEmail",this.enableEmail),this.listenTo(wp.Modula.Settings,"change:enable_responsive",this.changedResponsiveness),this.listenTo(wp.Modula.Settings,"change:hide_title",this.hideTitle),this.listenTo(wp.Modula.Settings,"change:hide_description",this.hideCaption),this.listenTo(wp.Modula.Settings,"change:grid_type",this.changedGridType),this.listenTo(wp.Modula.Settings,"change:grid_image_size",this.changedGridImageSize),this.listenTo(wp.Modula.Settings,"toggleAccordeon:enableSocial",this.toggleSocial),this.listenTo(wp.Modula.Settings,"change:cursor",this.changeCursor)},initValues:function(){this.changedType(!1,wp.Modula.Settings.get("type")),this.changedLightbox(!1,wp.Modula.Settings.get("lightbox")),this.enableSocial(!1,wp.Modula.Settings.get("enableSocial")),this.enableEmail(!1,wp.Modula.Settings.get("enableEmail")),this.changedResponsiveness(!1,wp.Modula.Settings.get("enable_responsive")),this.hideTitle(!1,wp.Modula.Settings.get("hide_title")),this.hideCaption(!1,wp.Modula.Settings.get("hide_description")),this.changedGridType(!1,wp.Modula.Settings.get("grid_type")),this.changedGridImageSize(!1,wp.Modula.Settings.get("grid_image_size")),this.changeCursor(!1,wp.Modula.Settings.get("cursor"))},changedType:function(t,a){var i=this.get("rows"),e=this.get("tabs");"custom-grid"==a?(e.filter('[data-tab="modula-responsive"]').show(),i.filter('[data-container="columns"], [data-container="gutter"]').setting_state(this,"on"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').setting_state(this,"off"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').hide(),i.filter('[data-container="maxImagesCount"]').setting_state(this,"on"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off")):"creative-gallery"==a?(e.filter('[data-tab="modula-responsive"]').hide(),i.filter('[data-container="columns"]').setting_state(this,"off"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').setting_state(this,"on"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').show(),i.filter('[data-container="height"], [data-container="gutter"], [data-container="shuffle"], [data-container="showAllOnLightbox"],[data-container="maxImagesCount"]').setting_state(this,"on"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off")):"grid"==a?(i.filter('[data-container="grid_type"], [data-container="width"],[data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"],[data-container="maxImagesCount"],[data-container="shuffle"]').show(),i.filter('[data-container="grid_type"], [data-container="width"],[data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"],[data-container="maxImagesCount"],[data-container="shuffle"]').setting_state(this,"on"),i.filter('[data-container="height"], [data-container="randomFactor"]').setting_state(this,"off"),i.filter('[data-container="height"], [data-container="randomFactor"]').hide(),e.filter('[data-tab="modula-responsive"]').show(),this.changedGridType(!1,wp.Modula.Settings.get("grid_type"))):(i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="randomFactor"],[data-container="shuffle"]').show(),i.filter('[data-container="randomFactor"],[data-container="shuffle"]').setting_state(this,"on")),this.changedGridImageSize(!1,wp.Modula.Settings.get("grid_image_size"))},changeCursor:function(t,a){"custom"!=a&&jQuery(".modula-effects-preview > div").css("cursor",wp.Modula.Settings.get("cursor"))},changedLightbox:function(t,a){var i=this.get("rows"),e=this.get("tabs");"fancybox"==a?(i.filter('[data-container="show_navigation"],[data-container="lightbox_keyboard"]').setting_state(this,"on"),e.filter('[data-tab="modula-exif"],[data-tab="modula-zoom"]').show()):(i.filter('[data-container="show_navigation"],[data-container="lightbox_keyboard"]').setting_state(this,"off"),e.filter('[data-tab="modula-exif"],[data-tab="modula-zoom"]').hide())},changedEffect:function(t,a){var i=jQuery(".modula-effects-preview > div");i.setting_state(this,"off"),i.filter(".panel-"+a).setting_state(this,"on")},enableSocial:function(t,a){var i=this.get("rows").filter('[data-container="enableSocial"]'),e=i.data("children");jQuery.each(e,(function(t,e){var n=jQuery('[data-container="'+e+'"]');0==a&&i.hasClass("modula_accordion_open")?(n.setting_state(this,"off"),n.show()):0==a?n.hide():(n.setting_state(this,"on"),n.show())})),0!=a&&i.addClass("modula_accordion_open"),this.enableEmail(!1,wp.Modula.Settings.get("enableEmail"))},toggleSocial:function(){var t=this.get("rows"),a=t.filter('[data-container="enableSocial"]'),i=t.filter('[data-container="enableEmail"]'),e=i.data("children");a.hasClass("modula_accordion_open")||(jQuery.each(e,(function(t,a){jQuery('[data-container="'+a+'"]').hide()})),i.hasClass("modula_accordion_open")&&i.removeClass("modula_accordion_open"))},enableEmail:function(t,a){var i=this.get("rows"),e=i.filter('[data-container="enableEmail"]'),n=(i.filter('[data-container="enableSocial"]'),e.data("children"));jQuery.each(n,(function(t,i){var n=jQuery('[data-container="'+i+'"]');0!=a&&0!=wp.Modula.Settings.get("enableSocial")||!e.hasClass("modula_accordion_open")?0==a||0==wp.Modula.Settings.get("enableSocial")?n.hide():(n.css("opacity","1"),n.find("input, textarea, select, button").removeAttr("disabled"),n.show()):(n.setting_state(this,"off"),n.show())})),1==a&&1==wp.Modula.Settings.get("enableSocial")&&e.addClass("modula_accordion_open")},changedResponsiveness:function(t,a){var i=this.get("rows").filter('[data-container="enable_responsive"]'),e=i.data("children");jQuery.each(e,(function(t,e){var n=jQuery('[data-container="'+e+'"]');0==a&&i.hasClass("modula_accordion_open")?(n.setting_state(this,"off"),n.show()):0==a?n.hide():(n.css("opacity","1"),n.find("input, textarea, select, button").removeAttr("disabled"),n.show())})),1==a&&i.addClass("modula_accordion_open")},hideTitle:function(t,a){var i=this.get("rows").filter('[data-container="hide_title"]'),e=i.data("children");i.addClass("modula_accordion_reversed"),jQuery.each(e,(function(t,e){var n=jQuery('[data-container="'+e+'"]');1==a&&i.hasClass("modula_accordion_open")?(n.setting_state(this,"off"),n.show()):1==a?n.hide():(n.css("opacity","1"),n.setting_state(this,"on"),n.show())})),1!=a&&i.addClass("modula_accordion_open")},hideCaption:function(t,a){var i=this.get("rows").filter('[data-container="hide_description"]'),e=i.data("children");i.addClass("modula_accordion_reversed"),jQuery.each(e,(function(t,e){var n=jQuery('[data-container="'+e+'"]');1==a&&i.hasClass("modula_accordion_open")?(n.setting_state(this,"off"),n.show()):1==a?n.hide():(n.css("opacity","1"),n.setting_state(this,"on"),n.show())})),1!=a&&i.addClass("modula_accordion_open")},changedGridType:function(t,a){var i=this.get("rows"),e=this.get("tabs");"grid"==wp.Modula.Settings.get("type")&&("automatic"==a||""==a?(i.filter(' [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"]').setting_state(this,"on"),e.filter('[data-tab="modula-responsive"]').hide()):(i.filter(' [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off"),i.filter('[data-container="grid_type"],[data-container="gutter"]').setting_state(this,"on"),e.filter('[data-tab="modula-responsive"]').show()))},changedGridImageSize:function(t,a){let i=this.get("rows"),e=this.get("imagesizes");"custom-grid"==wp.Modula.Settings.get("type")?"custom"==a?(i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').hide(),i.filter('[data-container="img_size"], [data-container="img_crop"]').show(),i.filter('[data-container="img_size"], [data-container="img_crop"]').setting_state(this,"on")):(i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').hide(),i.filter('[data-container="img_size"], [data-container="img_crop"]').show(),i.filter('[data-container="img_size"], [data-container="img_crop"]').setting_state(this,"off")):"custom"==wp.Modula.Settings.get("grid_image_size")?(i.filter('[data-container="img_size"], [data-container="img_crop"]').hide(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').show(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').setting_state(this,"on")):(i.filter('[data-container="img_size"], [data-container="img_crop"]').hide(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').show(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').setting_state(this,"off"));var n=e.filter('[data-size="'+a+'"]');e.hide(),n.length>0&&n.show()}});
\ No newline at end of file
+wp.Modula=void 0===wp.Modula?{}:wp.Modula,jQuery.fn.setting_state=function(t,a){"off"==a&&(this.css("opacity","0.5"),this.find("input, textarea, select, button").addClass("modula-no-pointer"),this.hide()),"on"==a&&(this.css("opacity","1"),this.find("input, textarea, select, button").removeClass("modula-no-pointer"),this.show())};var modulaGalleryConditions=Backbone.Model.extend({initialize:function(t){var a=jQuery(".modula-settings-container tr[data-container]"),i=jQuery(".modula-tabs .modula-tab");this.set("rows",a),this.set("tabs",i);var e=jQuery('.modula-settings-container tr[data-container="grid_image_size"] .modula-imagesizes-infos .modula-imagesize-info');this.set("imagesizes",e),this.initEvents(),this.initValues()},initEvents:function(){this.listenTo(wp.Modula.Settings,"change:type",this.changedType),this.listenTo(wp.Modula.Settings,"change:effect",this.changedEffect),this.listenTo(wp.Modula.Settings,"change:lightbox",this.changedLightbox),this.listenTo(wp.Modula.Settings,"change:enableSocial",this.enableSocial),this.listenTo(wp.Modula.Settings,"change:enableEmail",this.enableEmail),this.listenTo(wp.Modula.Settings,"change:enable_responsive",this.changedResponsiveness),this.listenTo(wp.Modula.Settings,"change:hide_title",this.hideTitle),this.listenTo(wp.Modula.Settings,"change:hide_description",this.hideCaption),this.listenTo(wp.Modula.Settings,"change:grid_type",this.changedGridType),this.listenTo(wp.Modula.Settings,"change:grid_image_size",this.changedGridImageSize),this.listenTo(wp.Modula.Settings,"toggleAccordeon:enableSocial",this.toggleSocial),this.listenTo(wp.Modula.Settings,"change:cursor",this.changeCursor)},initValues:function(){this.changedType(!1,wp.Modula.Settings.get("type")),this.changedLightbox(!1,wp.Modula.Settings.get("lightbox")),this.enableSocial(!1,wp.Modula.Settings.get("enableSocial")),this.enableEmail(!1,wp.Modula.Settings.get("enableEmail")),this.changedResponsiveness(!1,wp.Modula.Settings.get("enable_responsive")),this.hideTitle(!1,wp.Modula.Settings.get("hide_title")),this.hideCaption(!1,wp.Modula.Settings.get("hide_description")),this.changedGridType(!1,wp.Modula.Settings.get("grid_type")),this.changedGridImageSize(!1,wp.Modula.Settings.get("grid_image_size")),this.changeCursor(!1,wp.Modula.Settings.get("cursor"))},changedType:function(t,a){var i=this.get("rows"),e=this.get("tabs");"custom-grid"==a?(e.filter('[data-tab="modula-responsive"]').show(),i.filter('[data-container="columns"], [data-container="gutter"]').setting_state(this,"on"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').setting_state(this,"off"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').hide(),i.filter('[data-container="maxImagesCount"]').setting_state(this,"on"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off")):"creative-gallery"==a?(e.filter('[data-tab="modula-responsive"]').hide(),i.filter('[data-container="columns"]').setting_state(this,"off"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').setting_state(this,"on"),i.filter('[data-container="width"], [data-container="height"], [data-container="randomFactor"], [data-container="shuffle"]').show(),i.filter('[data-container="height"], [data-container="gutter"], [data-container="shuffle"], [data-container="showAllOnLightbox"],[data-container="maxImagesCount"]').setting_state(this,"on"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off")):"grid"==a?(i.filter('[data-container="grid_type"], [data-container="width"],[data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"],[data-container="maxImagesCount"],[data-container="shuffle"]').show(),i.filter('[data-container="grid_type"], [data-container="width"],[data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"],[data-container="maxImagesCount"],[data-container="shuffle"]').setting_state(this,"on"),i.filter('[data-container="height"], [data-container="randomFactor"]').setting_state(this,"off"),i.filter('[data-container="height"], [data-container="randomFactor"]').hide(),e.filter('[data-tab="modula-responsive"]').show(),this.changedGridType(!1,wp.Modula.Settings.get("grid_type"))):(i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off"),i.filter('[data-container="grid_type"], [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_row_height"], [data-container="grid_justify_last_row"]').hide(),i.filter('[data-container="randomFactor"],[data-container="shuffle"]').show(),i.filter('[data-container="randomFactor"],[data-container="shuffle"]').setting_state(this,"on")),this.changedGridImageSize(!1,wp.Modula.Settings.get("grid_image_size"))},changeCursor:function(t,a){"custom"!=a&&jQuery(".modula-effects-preview > div").css("cursor",wp.Modula.Settings.get("cursor"))},changedLightbox:function(t,a){var i=this.get("rows"),e=this.get("tabs");"fancybox"==a?(i.filter('[data-container="show_navigation"],[data-container="lightbox_keyboard"]').setting_state(this,"on"),e.filter('[data-tab="modula-exif"],[data-tab="modula-zoom"]').show()):(i.filter('[data-container="show_navigation"],[data-container="lightbox_keyboard"]').setting_state(this,"off"),e.filter('[data-tab="modula-exif"],[data-tab="modula-zoom"]').hide())},changedEffect:function(t,a){var i=jQuery(".modula-effects-preview > div");i.setting_state(this,"off"),i.filter(".panel-"+a).setting_state(this,"on")},enableSocial:function(t,a){var i=this.get("rows").filter('[data-container="enableSocial"]'),e=i.data("children");jQuery.each(e,(function(t,i){var e=jQuery('[data-container="'+i+'"]');0==a?e.hide():(e.setting_state(this,"on"),e.show())})),0!=a?i.addClass("modula_accordion_open"):i.removeClass("modula_accordion_open"),this.enableEmail(!1,wp.Modula.Settings.get("enableEmail"))},toggleSocial:function(){var t=this.get("rows"),a=t.filter('[data-container="enableSocial"]'),i=t.filter('[data-container="enableEmail"]'),e=i.data("children");a.hasClass("modula_accordion_open")||(jQuery.each(e,(function(t,a){jQuery('[data-container="'+a+'"]').hide()})),i.hasClass("modula_accordion_open")&&i.removeClass("modula_accordion_open"))},enableEmail:function(t,a){var i=this.get("rows"),e=i.filter('[data-container="enableEmail"]'),n=(i.filter('[data-container="enableSocial"]'),e.data("children"));jQuery.each(n,(function(t,i){var e=jQuery('[data-container="'+i+'"]');0==a||0==wp.Modula.Settings.get("enableSocial")?e.hide():e.show()})),1==a&&1==wp.Modula.Settings.get("enableSocial")?e.addClass("modula_accordion_open"):e.removeClass("modula_accordion_open")},changedResponsiveness:function(t,a){var i=this.get("rows").filter('[data-container="enable_responsive"]'),e=i.data("children");jQuery.each(e,(function(t,i){var e=jQuery('[data-container="'+i+'"]');0==a?e.hide():e.show()})),1==a?i.addClass("modula_accordion_open"):i.removeClass("modula_accordion_open")},hideTitle:function(t,a){var i=this.get("rows").filter('[data-container="hide_title"]'),e=i.data("children");i.addClass("modula_accordion_reversed"),jQuery.each(e,(function(t,i){var e=jQuery('[data-container="'+i+'"]');1==a?e.hide():(e.show(),e.setting_state(this,"on"))})),1!=a?i.addClass("modula_accordion_open"):i.removeClass("modula_accordion_open")},hideCaption:function(t,a){var i=this.get("rows").filter('[data-container="hide_description"]'),e=i.data("children");i.addClass("modula_accordion_reversed"),jQuery.each(e,(function(t,i){var e=jQuery('[data-container="'+i+'"]');1==a?e.hide():(e.show(),e.setting_state(this,"on"))})),1!=a?i.addClass("modula_accordion_open"):i.removeClass("modula_accordion_open")},changedGridType:function(t,a){var i=this.get("rows"),e=this.get("tabs");"grid"==wp.Modula.Settings.get("type")&&("automatic"==a||""==a?(i.filter(' [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_justify_last_row"], [data-container="gutter"]').setting_state(this,"on"),e.filter('[data-tab="modula-responsive"]').hide()):(i.filter(' [data-container="grid_row_height"], [data-container="grid_max_row_height"], [data-container="grid_justify_last_row"]').setting_state(this,"off"),i.filter('[data-container="grid_type"],[data-container="gutter"]').setting_state(this,"on"),e.filter('[data-tab="modula-responsive"]').show()))},changedGridImageSize:function(t,a){let i=this.get("rows"),e=this.get("imagesizes");"custom-grid"==wp.Modula.Settings.get("type")?"custom"==a?(i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').hide(),i.filter('[data-container="img_size"], [data-container="img_crop"]').show(),i.filter('[data-container="img_size"], [data-container="img_crop"]').setting_state(this,"on")):(i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').hide(),i.filter('[data-container="img_size"], [data-container="img_crop"]').show(),i.filter('[data-container="img_size"], [data-container="img_crop"]').setting_state(this,"off")):"custom"==wp.Modula.Settings.get("grid_image_size")?(i.filter('[data-container="img_size"], [data-container="img_crop"]').hide(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').show(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').setting_state(this,"on")):(i.filter('[data-container="img_size"], [data-container="img_crop"]').hide(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').show(),i.filter('[data-container="grid_image_dimensions"], [data-container="grid_image_crop"]').setting_state(this,"off"));var n=e.filter('[data-size="'+a+'"]');e.hide(),n.length>0&&n.show()}});
\ No newline at end of file
diff --git a/assets/js/admin/wp-modula-gutenberg.js b/assets/js/admin/wp-modula-gutenberg.js
index a75080fa..1c48f691 100644
--- a/assets/js/admin/wp-modula-gutenberg.js
+++ b/assets/js/admin/wp-modula-gutenberg.js
@@ -251,12 +251,15 @@ var ModulaGalleryImageInner = function ModulaGalleryImageInner(props) {
img = props.img,
hideTitle = props.hideTitle,
hideDescription = props.hideDescription,
- hideSocial = props.hideSocial;
+ hideSocial = props.hideSocial,
+ index = props.index;
var effectArray = ['tilt_1', 'tilt_3', 'tilt_7'],
overlayArray = ['tilt_3', 'tilt_7'],
svgArray = ['tilt_1', 'tilt_7'],
jtgBody = ['lily', 'centered-bottom', 'sadie', 'ruby', 'bubba', 'dexter', 'chico', 'ming'];
- return [/*#__PURE__*/React.createElement(ModulaGalleryImageInner_Fragment, null, effectArray.includes(settings.effect) && /*#__PURE__*/React.createElement("div", {
+ return [/*#__PURE__*/React.createElement(ModulaGalleryImageInner_Fragment, {
+ key: index
+ }, effectArray.includes(settings.effect) && /*#__PURE__*/React.createElement("div", {
className: "tilter__deco tilter__deco--shine"
}, /*#__PURE__*/React.createElement("div", null)), overlayArray.includes(settings.effect) && /*#__PURE__*/React.createElement("div", {
className: "tilter__deco tilter__deco--overlay"
@@ -364,6 +367,7 @@ var ModulaGalleryImage = function ModulaGalleryImage(props) {
settings: settings,
img: img,
index: index,
+ key: index,
hideTitle: effectCheck && effectCheck.title ? false : true,
hideDescription: effectCheck && effectCheck.description ? false : true,
hideSocial: effectCheck && effectCheck.social ? false : true,
@@ -822,7 +826,7 @@ var ModulaEdit = function ModulaEdit(props) {
galleryType: 'gallery'
});
}
- }, edit_('Display An Existing Gallery', 'modula-best-grid-gallery'), utils_icons.chevronRightFancy), undefined == props.attributes.proInstalled && galleries.length > 0 && /*#__PURE__*/React.createElement(edit_Button, {
+ }, edit_('Display An Existing Gallery', 'modula-best-grid-gallery'), utils_icons.chevronRightFancy), !attributes.proInstalled && galleries.length > 0 && /*#__PURE__*/React.createElement(edit_Button, {
href: "https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",
className: "modula-button-upsell",
isSecondary: true,
@@ -958,6 +962,10 @@ var ModulaGutenberg = /*#__PURE__*/function () {
currentSelectize: {
type: 'array',
"default": []
+ },
+ proInstalled: {
+ type: 'boolean',
+ "default": 'true' === modulaVars.proInstalled
}
};
registerBlockType(this.blockName, {
diff --git a/assets/js/admin/wp-modula-gutenberg.min.js b/assets/js/admin/wp-modula-gutenberg.min.js
index 98852e36..bf152bca 100644
--- a/assets/js/admin/wp-modula-gutenberg.min.js
+++ b/assets/js/admin/wp-modula-gutenberg.min.js
@@ -1 +1 @@
-(()=>{"use strict";var t=wp.element.useEffect;const e=function(e){var a=e.onIdChange,l=e.id,n=e.options,o=e.galleries;return t((function(){var t=[];null!=o&&0==t.length&&o.forEach((function(e){t.push({value:e.id,label:e.title.rendered})})),jQuery(".modula-gallery-input").selectize({valueField:"value",labelField:"label",searchField:["label","value"],create:!1,maxItems:1,placeholder:"Search for a gallery...",preload:!0,allowEmptyOptions:!0,closeAfterSelect:!0,options:n.concat(t),render:{option:function(t,e){return'
'+t.label+' (#'+e(t.value)+")
"}},load:function(t,e){if(!t.length)return e();jQuery.ajax({url:modulaVars.ajaxURL,type:"GET",data:{action:"modula_get_gallery",nonce:modulaVars.nonce,term:t},success:function(t){e(t)}})},onChange:function(t){a(t)}})}),[]),React.createElement("input",{className:"modula-gallery-input",defaultValue:"0"==l?"":l})};var a=wp.i18n.__,l=wp.element.Fragment,n=wp.blockEditor.InspectorControls,o=wp.components,c=o.Button,r=o.PanelBody;const i=wp.components.withFilters("modula.ModulaInspector")((function(t){var o=t.attributes,i=t.galleries,d=t.onIdChange,m=o.id,u=o.currentSelectize;return React.createElement(l,null,React.createElement(n,null,React.createElement(r,{title:a("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},i.length>0&&React.createElement(l,null,React.createElement(e,{id:m,key:m,value:m,options:u,onIdChange:d,galleries:i}),0!=m&&React.createElement(c,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+m+"&action=edit",isSecondary:!0},a("Edit gallery"))))))}));var d={};d.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1 c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5 c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7 c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4 c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1 C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9 c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5 c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3 c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),d.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),d.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),d.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),d.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),d.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",className:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),d.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",className:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),d.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),d.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",className:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),d.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",className:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),d.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),d.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));const m=d;var u=wp.element.Fragment;const s=function(t){var e=t.settings,a=t.img,l=t.hideTitle,n=t.hideDescription,o=t.hideSocial;return[React.createElement(u,null,["tilt_1","tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==e.hide_title&&!l&&React.createElement("div",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","centered-bottom","sadie","ruby","bubba","dexter","chico","ming"].includes(e.effect)?"jtg-body":""},"0"==e.hide_description&&!n&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!o&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",m.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",m.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",m.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",m.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",m.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",m.email," "))))))]};const g=wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=e.settings,l=e.effectCheck,n=t.img,o=t.index,c="modula-item effect-".concat(a.effect);"slider"===a.type&&(c="modula-item f-carousel__slide");return React.createElement("div",{className:c,"data-width":n["data-width"]?n["data-width"]:"2","data-height":n["data-height"]?n["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},n.video_template&&"1"===n.video_template&&n.video_type?"1"==n.video_template&&void 0!==n.video_thumbnail&&""!=n.video_thumbnail?React.createElement("img",{className:"modula-image pic","data-id":n.id,"data-full":n.src,"data-src":n.video_thumbnail,"data-valign":"middle","data-halign":"center",src:n.video_thumbnail}):"hosted"===n.video_type?React.createElement("div",{className:"video-sizer"},React.createElement("video",{controls:!0},React.createElement("source",{src:n.src,type:"video/mp4"}),"Your browser does not support the video tag.")):"iframe"===n.video_type?React.createElement("div",{className:"video-sizer"},React.createElement("iframe",{src:n.src,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})):void 0:React.createElement("img",{className:"modula-image pic","data-id":n.id,"data-full":n.src,"data-src":n.src,"data-valign":"middle","data-halign":"center",src:n.src}),"slider"!==a.type&&React.createElement(s,{settings:a,img:n,index:o,hideTitle:!l||!l.title,hideDescription:!l||!l.description,hideSocial:!l||!l.social,effectCheck:l})))}));const f=function(t){var e=t.id,a=t.settings,l="";"grid"==a.type&&"automatic"!=a.grid_type&&(l+="#jtg-".concat(e,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(l+="#jtg-".concat(e," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(l+="#jtg-".concat(e," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(l+="#jtg-".concat(e," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(l+="#jtg-".concat(e," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(l+="#jtg-".concat(e," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(l+="#jtg-".concat(e," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),l+="#jtg-".concat(e," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(l+="#jtg-".concat(e," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(l+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(l+="#jtg-".concat(e," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),l+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?l+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):l+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),l+="#jtg-".concat(e,".modula-gallery .modula-item > a, #jtg-").concat(e,".modula-gallery .modula-item, #jtg-").concat(e,".modula-gallery .modula-item-content > a:not(.modula-no-follow){\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(l+="#jtg-".concat(e," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==t.imagesCount?l+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type&&"bnb"!=a.type?l+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: ").concat(a.height[0],"px;\n\t\t\t}"):"slider"==a.type&&(l+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(l+="".concat(a.style));var n="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(n+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),n+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),l+="@media screen and (max-width:480px){\n\t\t".concat(n,"\n\t\t}"),"none"==a.effect&&(l+="#jtg-".concat(e," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),l+="#jtg-".concat(e,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(e,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(e,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(e,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(e,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(e,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(e,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(e,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(e,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(e,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(e,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),l+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(l+="#jtg-".concat(e,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(l+="#jtg-".concat(e,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(l+="#jtg-".concat(e,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),l+="#jtg-".concat(e,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?l+="#jtg-".concat(e," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):l+="#jtg-".concat(e," {\n\t\t\twidth: 1100px;\n\t\t\t}"),l+="#jtg-".concat(e," .modula-items {\n\t\theight: auto;\n\t\t}"),l+="#jtg-".concat(e," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(l+="#jtg-".concat(e,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),"bnb"==a.type&&(l+="#jtg-".concat(e,".modula.modula-gallery-bnb .modula_bnb_main_wrapper{flex-basis: calc( 50% - ")+a.gutter/2+"px );}",l+="#jtg-".concat(e,".modula.modula-gallery-bnb .modula_bnb_items_wrapper{flex-basis: calc( 50% - ")+a.gutter/2+"px );gap: "+a.gutter+"px;}"),l+="#jtg-".concat(e,".modula.modula-gallery.modula-gallery-initialized .modula-item-content{opacity:1;}"),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(l,"\n \t\t\t\t")}})};const p=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&React.createElement(y,null,"bnb"===o.type?React.createElement(y,null,React.createElement("div",{className:"modula_bnb_main_wrapper"},React.createElement(g,h({},t,{img:a[0],key:a[0].id,index:0}))),React.createElement("div",{className:"modula_bnb_items_wrapper"},a.slice(1).map((function(e,a){return React.createElement(g,h({},t,{img:e,key:e.id,index:a+1}))})))):a.map((function(e,a){return e.id?React.createElement(g,h({},t,{img:e,key:e.id,index:a})):null})))),React.createElement(p,h({},t,{position:"bottom"}))))}));function R(){return R=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var a=0,l=Array(e);a0&&React.createElement(I,null,React.createElement(q,null,React.createElement(M,{label:x("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+o+"&action=edit",target:"_blank"}))));return 0==o&&"none"===a.galleryType?React.createElement(C,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},0==l.length&&React.createElement("p",null," ",x("Sorry no galleries found","modula-best-grid-gallery")," "),l.length>0&&React.createElement(M,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},x("Display An Existing Gallery","modula-best-grid-gallery"),m.chevronRightFancy),null==t.attributes.proInstalled&&l.length>0&&React.createElement(M,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},x("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery")))))):"loading"===r?React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(F,null))):0==o||0===c.length?React.createElement(C,{key:"233"},React.createElement(i,R({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:x("select a gallery","modula-best-grid-gallery")}];return l.forEach((function(e){var a=e.title,l=e.id;0==a.rendered.length?t.push({value:l,label:x("Unnamed Gallery","modula-best-grid-gallery")+l}):t.push({value:l,label:a.rendered})})),t}},t)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),l.length>0&&React.createElement(C,null,React.createElement(e,{id:o,key:o,value:o,options:g,onIdChange:v,galleries:l}),0!=o&&React.createElement(M,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+o+"&action=edit",isPrimary:!0},x("Edit Gallery")))))):d?React.createElement(C,{key:"1"},w,React.createElement(i,R({onIdChange:function(t){v(t)}},t)),React.createElement(E,R({},t,{settings:d,jsConfig:u,modulaRun:function(t){if(null!=t){n({status:"ready"});var e=jQuery(".modula.modula-gallery");jQuery.each(e,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config");t.lazyLoad=0,jQuery(this).modulaGallery(t)}))}},modulaCarouselRun:function(t){t="jtg-".concat(t),n({status:"ready"});var e=jQuery(".modula-slider");if(e.length>0&&"function"==typeof ModulaCarousel){var a=jQuery("#".concat(t)).data("config"),l=jQuery("#".concat(t)).find(".modula-items");new ModulaCarousel(l[0],a.slider_settings)}else if(e.length>0&&void 0!==jQuery.fn.slick){var o=jQuery("#".concat(t)).data("config");jQuery("#".concat(t)).find(".modula-items").slick(o.slider_settings)}},checkHoverEffect:function(t){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:t},url:modulaVars.ajaxURL,success:function(t){n({effectCheck:t})}})},galleryId:s}))):null}));function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function L(t,e){for(var a=0;a{"use strict";var e=wp.element.useEffect;const t=function(t){var a=t.onIdChange,l=t.id,n=t.options,o=t.galleries;return e((function(){var e=[];null!=o&&0==e.length&&o.forEach((function(t){e.push({value:t.id,label:t.title.rendered})})),jQuery(".modula-gallery-input").selectize({valueField:"value",labelField:"label",searchField:["label","value"],create:!1,maxItems:1,placeholder:"Search for a gallery...",preload:!0,allowEmptyOptions:!0,closeAfterSelect:!0,options:n.concat(e),render:{option:function(e,t){return''+e.label+' (#'+t(e.value)+")
"}},load:function(e,t){if(!e.length)return t();jQuery.ajax({url:modulaVars.ajaxURL,type:"GET",data:{action:"modula_get_gallery",nonce:modulaVars.nonce,term:e},success:function(e){t(e)}})},onChange:function(e){a(e)}})}),[]),React.createElement("input",{className:"modula-gallery-input",defaultValue:"0"==l?"":l})};var a=wp.i18n.__,l=wp.element.Fragment,n=wp.blockEditor.InspectorControls,o=wp.components,c=o.Button,r=o.PanelBody;const i=wp.components.withFilters("modula.ModulaInspector")((function(e){var o=e.attributes,i=e.galleries,d=e.onIdChange,m=o.id,u=o.currentSelectize;return React.createElement(l,null,React.createElement(n,null,React.createElement(r,{title:a("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},i.length>0&&React.createElement(l,null,React.createElement(t,{id:m,key:m,value:m,options:u,onIdChange:d,galleries:i}),0!=m&&React.createElement(c,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+m+"&action=edit",isSecondary:!0},a("Edit gallery"))))))}));var d={};d.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1 c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5 c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7 c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4 c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1 C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9 c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5 c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3 c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),d.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),d.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),d.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),d.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),d.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",className:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),d.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",className:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),d.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),d.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",className:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),d.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",className:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),d.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),d.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));const m=d;var u=wp.element.Fragment;const s=function(e){var t=e.settings,a=e.img,l=e.hideTitle,n=e.hideDescription,o=e.hideSocial,c=e.index;return[React.createElement(u,{key:c},["tilt_1","tilt_3","tilt_7"].includes(t.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(t.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(t.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==t.hide_title&&!l&&React.createElement("div",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","centered-bottom","sadie","ruby","bubba","dexter","chico","ming"].includes(t.effect)?"jtg-body":""},"0"==t.hide_description&&!n&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!o&&"1"==t.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==t.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",m.twitter," "),"1"==t.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",m.facebook," "),"1"==t.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",m.whatsapp," "),"1"==t.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",m.linkedin," "),"1"==t.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",m.pinterest," "),"1"==t.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",m.email," "))))))]};const g=wp.components.withFilters("modula.ModulaGalleryImage")((function(e){var t=e.attributes,a=t.settings,l=t.effectCheck,n=e.img,o=e.index,c="modula-item effect-".concat(a.effect);"slider"===a.type&&(c="modula-item f-carousel__slide");return React.createElement("div",{className:c,"data-width":n["data-width"]?n["data-width"]:"2","data-height":n["data-height"]?n["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},n.video_template&&"1"===n.video_template&&n.video_type?"1"==n.video_template&&void 0!==n.video_thumbnail&&""!=n.video_thumbnail?React.createElement("img",{className:"modula-image pic","data-id":n.id,"data-full":n.src,"data-src":n.video_thumbnail,"data-valign":"middle","data-halign":"center",src:n.video_thumbnail}):"hosted"===n.video_type?React.createElement("div",{className:"video-sizer"},React.createElement("video",{controls:!0},React.createElement("source",{src:n.src,type:"video/mp4"}),"Your browser does not support the video tag.")):"iframe"===n.video_type?React.createElement("div",{className:"video-sizer"},React.createElement("iframe",{src:n.src,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})):void 0:React.createElement("img",{className:"modula-image pic","data-id":n.id,"data-full":n.src,"data-src":n.src,"data-valign":"middle","data-halign":"center",src:n.src}),"slider"!==a.type&&React.createElement(s,{settings:a,img:n,index:o,key:o,hideTitle:!l||!l.title,hideDescription:!l||!l.description,hideSocial:!l||!l.social,effectCheck:l})))}));const f=function(e){var t=e.id,a=e.settings,l="";"grid"==a.type&&"automatic"!=a.grid_type&&(l+="#jtg-".concat(t,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(l+="#jtg-".concat(t," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(l+="#jtg-".concat(t," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(l+="#jtg-".concat(t," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(l+="#jtg-".concat(t," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(l+="#jtg-".concat(t," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(l+="#jtg-".concat(t," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),l+="#jtg-".concat(t," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(l+="#jtg-".concat(t," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(l+="#jtg-".concat(t," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(l+="#jtg-".concat(t," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),l+="#jtg-".concat(t," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?l+="#jtg-".concat(t," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):l+="#jtg-".concat(t," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),l+="#jtg-".concat(t,".modula-gallery .modula-item > a, #jtg-").concat(t,".modula-gallery .modula-item, #jtg-").concat(t,".modula-gallery .modula-item-content > a:not(.modula-no-follow){\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(l+="#jtg-".concat(t," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==e.imagesCount?l+="#jtg-".concat(t," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type&&"bnb"!=a.type?l+="#jtg-".concat(t," .modula-items {\n\t\t\t\theight: ").concat(a.height[0],"px;\n\t\t\t}"):"slider"==a.type&&(l+="#jtg-".concat(t," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(l+="".concat(a.style));var n="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(n+="#jtg-".concat(t," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),n+="#jtg-".concat(t," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),l+="@media screen and (max-width:480px){\n\t\t".concat(n,"\n\t\t}"),"none"==a.effect&&(l+="#jtg-".concat(t," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),l+="#jtg-".concat(t,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(t,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(t,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(t,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(t,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(t,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(t,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(t,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(t,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(t,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(t,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(t,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(t,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(t,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(t,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),l+="#jtg-".concat(t,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(l+="#jtg-".concat(t,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(l+="#jtg-".concat(t,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(l+="#jtg-".concat(t,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),l+="#jtg-".concat(t,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?l+="#jtg-".concat(t," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):l+="#jtg-".concat(t," {\n\t\t\twidth: 1100px;\n\t\t\t}"),l+="#jtg-".concat(t," .modula-items {\n\t\theight: auto;\n\t\t}"),l+="#jtg-".concat(t," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(l+="#jtg-".concat(t,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),"bnb"==a.type&&(l+="#jtg-".concat(t,".modula.modula-gallery-bnb .modula_bnb_main_wrapper{flex-basis: calc( 50% - ")+a.gutter/2+"px );}",l+="#jtg-".concat(t,".modula.modula-gallery-bnb .modula_bnb_items_wrapper{flex-basis: calc( 50% - ")+a.gutter/2+"px );gap: "+a.gutter+"px;}"),l+="#jtg-".concat(t,".modula.modula-gallery.modula-gallery-initialized .modula-item-content{opacity:1;}"),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(l,"\n \t\t\t\t")}})};const p=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(e){return null}));function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&React.createElement(v,null,"bnb"===o.type?React.createElement(v,null,React.createElement("div",{className:"modula_bnb_main_wrapper"},React.createElement(g,h({},e,{img:a[0],key:a[0].id,index:0}))),React.createElement("div",{className:"modula_bnb_items_wrapper"},a.slice(1).map((function(t,a){return React.createElement(g,h({},e,{img:t,key:t.id,index:a+1}))})))):a.map((function(t,a){return t.id?React.createElement(g,h({},e,{img:t,key:t.id,index:a})):null})))),React.createElement(p,h({},e,{position:"bottom"}))))}));function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var a=0,l=Array(t);a0&&React.createElement(I,null,React.createElement(q,null,React.createElement(M,{label:x("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+o+"&action=edit",target:"_blank"}))));return 0==o&&"none"===a.galleryType?React.createElement(C,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},0==l.length&&React.createElement("p",null," ",x("Sorry no galleries found","modula-best-grid-gallery")," "),l.length>0&&React.createElement(M,{className:"modula-button",target:"_blank",onClick:function(e){n({status:"ready",id:0,galleryType:"gallery"})}},x("Display An Existing Gallery","modula-best-grid-gallery"),m.chevronRightFancy),null==e.attributes.proInstalled&&l.length>0&&React.createElement(M,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},x("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery")))))):"loading"===r?React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(F,null))):0==o||0===c.length?React.createElement(C,{key:"233"},React.createElement(i,R({onIdChange:function(e){return y(e)},selectOptions:function(){var e=[{value:0,label:x("select a gallery","modula-best-grid-gallery")}];return l.forEach((function(t){var a=t.title,l=t.id;0==a.rendered.length?e.push({value:l,label:x("Unnamed Gallery","modula-best-grid-gallery")+l}):e.push({value:l,label:a.rendered})})),e}},e)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),l.length>0&&React.createElement(C,null,React.createElement(t,{id:o,key:o,value:o,options:g,onIdChange:y,galleries:l}),0!=o&&React.createElement(M,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+o+"&action=edit",isPrimary:!0},x("Edit Gallery")))))):d?React.createElement(C,{key:"1"},w,React.createElement(i,R({onIdChange:function(e){y(e)}},e)),React.createElement(E,R({},e,{settings:d,jsConfig:u,modulaRun:function(e){if(null!=e){n({status:"ready"});var t=jQuery(".modula.modula-gallery");jQuery.each(t,(function(){jQuery(this).attr("id");var e=jQuery(this).data("config");e.lazyLoad=0,jQuery(this).modulaGallery(e)}))}},modulaCarouselRun:function(e){e="jtg-".concat(e),n({status:"ready"});var t=jQuery(".modula-slider");if(t.length>0&&"function"==typeof ModulaCarousel){var a=jQuery("#".concat(e)).data("config"),l=jQuery("#".concat(e)).find(".modula-items");new ModulaCarousel(l[0],a.slider_settings)}else if(t.length>0&&void 0!==jQuery.fn.slick){var o=jQuery("#".concat(e)).data("config");jQuery("#".concat(e)).find(".modula-items").slick(o.slider_settings)}},checkHoverEffect:function(e){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:e},url:modulaVars.ajaxURL,success:function(e){n({effectCheck:e})}})},galleryId:s}))):null}));function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function L(e,t){for(var a=0;a {
settings={settings}
img={img}
index={index}
+ key={index}
hideTitle={
effectCheck && effectCheck.title ? false : true
}
diff --git a/assets/src/js/components/ModulaGalleryImageInner.js b/assets/src/js/components/ModulaGalleryImageInner.js
index 7f19d3a8..a4dffdba 100644
--- a/assets/src/js/components/ModulaGalleryImageInner.js
+++ b/assets/src/js/components/ModulaGalleryImageInner.js
@@ -2,7 +2,7 @@ import icons from '../utils/icons';
const { Fragment } = wp.element;
const ModulaGalleryImageInner = (props) => {
- const { settings, img, hideTitle, hideDescription, hideSocial } = props;
+ const { settings, img, hideTitle, hideDescription, hideSocial, index } = props;
let effectArray = ['tilt_1', 'tilt_3', 'tilt_7'],
overlayArray = ['tilt_3', 'tilt_7'],
@@ -19,7 +19,7 @@ const ModulaGalleryImageInner = (props) => {
];
return [
-
+
{effectArray.includes(settings.effect) && (
diff --git a/assets/src/js/components/edit.js b/assets/src/js/components/edit.js
index 997509a8..55254e0a 100644
--- a/assets/src/js/components/edit.js
+++ b/assets/src/js/components/edit.js
@@ -262,7 +262,7 @@ export const ModulaEdit = (props) => {
{icons.chevronRightFancy}
)}
- {undefined == props.attributes.proInstalled &&
+ {!attributes.proInstalled &&
galleries.length > 0 && (