Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
add_action('after_setup_theme', function () {
global $ayecode_ui_version,$ayecode_ui_file_key;
$this_version = "0.2.43";
$this_version = "0.2.44";
if(empty($ayecode_ui_version) || version_compare($this_version , $ayecode_ui_version, '>')){
$ayecode_ui_version = $this_version ;
$ayecode_ui_file_key = wp_hash( __FILE__ );
Expand Down
5 changes: 5 additions & 0 deletions vendor/ayecode/wp-ayecode-ui/change-log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
= 0.2.44 - 2026-03-05 =
* BS5 conversion breaks inline padding and margin styles - FIXED
* Checks for the tooltip & popover functions before using to prevent errors - FIXED
* Conditional fields resets hidden input field values - FIXED

= 0.2.43 - 2026-01-22 =
* Dropdown does not show the option selected if the field value is 0 - FIXED

Expand Down
2 changes: 1 addition & 1 deletion vendor/ayecode/wp-ayecode-ui/example-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: AyeCode UI
Plugin URI: https://ayecode.io/
Description: This is an example plugin to test AyeCode UI Quickly.
Version: 0.2.43
Version: 0.2.44
Author: AyeCode Ltd
Author URI: https://userswp.io
License: GPL-2.0+
Expand Down
72 changes: 37 additions & 35 deletions vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AyeCode_UI_Settings {
*
* @var string
*/
public $version = '0.2.43';
public $version = '0.2.44';

/**
* Class textdomain.
Expand Down Expand Up @@ -2655,7 +2655,7 @@ function aui_cf_field_init_rules($) {
if (!$('[data-has-rule]').length) {
return;
}
$('input.select2-search__field').attr('data-ignore-rule','');
$('input.select2-search__field,.aui-cf-ignore-rule').attr('data-ignore-rule','');
$('[data-rule-key]').on('change keypress keyup gdclear', 'input, textarea', function() {
if (!$(this).hasClass('select2-search__field')) {
aui_cf_field_apply_rules($(this));
Expand Down Expand Up @@ -2884,7 +2884,7 @@ function aui_cf_field_apply_rules($el) {
* Get the field element.
*/
function aui_cf_field_get_element($el) {
var el = $el.find('input:not("[data-ignore-rule]"),textarea,select'), type = aui_cf_field_get_type($el);
var el = $el.find('input,textarea,select').not('[data-ignore-rule]'), type = aui_cf_field_get_type($el);
if (type && window._aui_cf_field_elements && typeof window._aui_cf_field_elements == 'object' && typeof window._aui_cf_field_elements[type] != 'undefined') {
el = window._aui_cf_field_elements[type];
}
Expand All @@ -2906,19 +2906,19 @@ function aui_cf_field_get_value($el) {

if ($el.is(':checkbox')) {
current_value = '';
if ($el.parents('[data-rule-key]').find('input:checked').length > 1) {
$el.parents('[data-rule-key]').find('input:checked').each(function() {
if ($el.parents('[data-rule-key]').find('input:checked').not('[data-ignore-rule]').length > 1) {
$el.parents('[data-rule-key]').find('input:checked').not('[data-ignore-rule]').each(function() {
current_value = current_value + jQuery(this).val() + ' ';
});
} else {
if ($el.parents('[data-rule-key]').find('input:checked').length >= 1) {
current_value = $el.parents('[data-rule-key]').find('input:checked').val();
if ($el.parents('[data-rule-key]').find('input:checked').not('[data-ignore-rule]').length >= 1) {
current_value = $el.parents('[data-rule-key]').find('input:checked').not('[data-ignore-rule]').val();
}
}
}

if ($el.is(':radio')) {
current_value = $el.parents('[data-rule-key]').find('input[type=radio]:checked').val();
current_value = $el.parents('[data-rule-key]').find('input[type=radio]:checked').not('[data-ignore-rule]').val();
}

return current_value;
Expand All @@ -2936,7 +2936,7 @@ function aui_cf_field_get_default_value($el) {
case 'date':
case 'textarea':
case 'select':
value = $el.find('input:text,input[type="number"],textarea,select').val();
value = $el.find('input:text,input[type="number"],textarea,select').not('[data-ignore-rule]').val();
break;
case 'phone':
case 'email':
Expand All @@ -2945,27 +2945,27 @@ function aui_cf_field_get_default_value($el) {
case 'hidden':
case 'password':
case 'file':
value = $el.find('input[type="' + type + '"]').val();
value = $el.find('input[type="' + type + '"]').not('[data-ignore-rule]').val();
break;
case 'multiselect':
value = $el.find('select').val();
value = $el.find('select').not('[data-ignore-rule]').val();
break;
case 'radio':
if ($el.find('input[type="radio"]:checked').length >= 1) {
value = $el.find('input[type="radio"]:checked').val();
if ($el.find('input[type="radio"]:checked').not('[data-ignore-rule]').length >= 1) {
value = $el.find('input[type="radio"]:checked').not('[data-ignore-rule]').val();
}
break;
case 'checkbox':
if ($el.find('input[type="checkbox"]:checked').length >= 1) {
if ($el.find('input[type="checkbox"]:checked').length > 1) {
if ($el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').length >= 1) {
if ($el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').length > 1) {
var values = [];
values.push(value);
$el.find('input[type="checkbox"]:checked').each(function() {
$el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').each(function() {
values.push(jQuery(this).val());
});
value = values;
} else {
value = $el.find('input[type="checkbox"]:checked').val();
value = $el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').val();
}
}
break;
Expand Down Expand Up @@ -2998,7 +2998,7 @@ function aui_cf_field_reset_default_value($el, bHide, setVal) {
case 'number':
case 'date':
case 'textarea':
$el.find('input:text,input[type="number"],textarea').val(setVal);
$el.find('input:text,input[type="number"],textarea').not('[data-ignore-rule]').val(setVal);
break;
case 'phone':
case 'email':
Expand All @@ -3007,45 +3007,47 @@ function aui_cf_field_reset_default_value($el, bHide, setVal) {
case 'hidden':
case 'password':
case 'file':
$el.find('input[type="' + type + '"]').val(setVal);
$el.find('input[type="' + type + '"]:not("[data-ignore-rule]")').val(setVal);
break;
case 'select':
$el.find('select').find('option').prop('selected', false);
$el.find('select').val(setVal);
$el.find('select').trigger('change');
var $elSelect = $el.find('select').not('[data-ignore-rule]');
$elSelect.find('option').prop('selected', false);
$elSelect.val(setVal);
$elSelect.trigger('change');
break;
case 'multiselect':
$el.find('select').find('option').prop('selected', false);
if ((typeof setVal === 'object' || typeof setVal === 'array') && !setVal.length && $el.find('select option:first').text() == '') {
$el.find('select option:first').remove(); // Clear first option to show placeholder.
var $elSelect = $el.find('select').not('[data-ignore-rule]');
$elSelect.find('option').prop('selected', false);
if ((typeof setVal === 'object' || typeof setVal === 'array') && !setVal.length && $elSelect.find('option:first').text() == '') {
$elSelect.find('option:first').remove(); // Clear first option to show placeholder.
}
if (typeof setVal === 'string') {
$el.find('select').val(setVal);
$elSelect.val(setVal);
} else {
jQuery.each(setVal, function(i, v) {
$el.find('select').find('option[value="' + v + '"]').prop('selected', true);
$elSelect.find('option[value="' + v + '"]').prop('selected', true);
});
}
$el.find('select').trigger('change');
$elSelect.trigger('change');
break;
case 'checkbox':
if ($el.find('input[type="checkbox"]:checked').length >= 1) {
$el.find('input[type="checkbox"]:checked').prop('checked', false).removeAttr('checked');
if ($el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').length >= 1) {
$el.find('input[type="checkbox"]:checked').not('[data-ignore-rule]').prop('checked', false).removeAttr('checked');
}
if (Array.isArray(setVal)) {
jQuery.each(setVal, function(i, v) {
$el.find('input[type="checkbox"][value="' + v + '"]').prop('checked', true);
$el.find('input[type="checkbox"][value="' + v + '"]').not('[data-ignore-rule]').prop('checked', true);
});
} else {
$el.find('input[type="checkbox"][value="' + setVal + '"]').prop('checked', true);
$el.find('input[type="checkbox"][value="' + setVal + '"]').not('[data-ignore-rule]').prop('checked', true);
}
break;
case 'radio':
setTimeout(function() {
if ($el.find('input[type="radio"]:checked').length >= 1) {
$el.find('input[type="radio"]:checked').prop('checked', false).removeAttr('checked');
if ($el.find('input[type="radio"]:checked').not('[data-ignore-rule]').length >= 1) {
$el.find('input[type="radio"]:checked').not('[data-ignore-rule]').prop('checked', false).removeAttr('checked');
}
$el.find('input[type="radio"][value="' + setVal + '"]').prop('checked', true);
$el.find('input[type="radio"][value="' + setVal + '"]').not('[data-ignore-rule]').prop('checked', true);
}, 100);
break;
default:
Expand Down
85 changes: 51 additions & 34 deletions vendor/ayecode/wp-ayecode-ui/includes/inc/bs-conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,66 +34,83 @@ function aui_bs_convert_sd_output( $output, $instance = '', $args = '', $sd = ''
'.mr-' => '.me-',
'.pl-' => '.ps-',
'.pr-' => '.pe-',
' form-row' => ' row',
' form-row' => ' row',
' embed-responsive-item' => '',
' embed-responsive' => ' ratio',
'-1by1' => '-1x1',
'-4by3' => '-4x3',
'-16by9' => '-16x9',
'-21by9' => '-21x9',
'geodir-lightbox-image' => 'aui-lightbox-image',
' embed-responsive' => ' ratio',
'-1by1' => '-1x1',
'-4by3' => '-4x3',
'-16by9' => '-16x9',
'-21by9' => '-21x9',
'geodir-lightbox-image' => 'aui-lightbox-image',
'geodir-lightbox-iframe' => 'aui-lightbox-iframe',
' badge-' => ' text-bg-',
'form-group' => 'mb-3',
'custom-select' => 'form-select',
'float-left' => 'float-start',
' badge-' => ' text-bg-',
'form-group' => 'mb-3',
'custom-select' => 'form-select',
'float-left' => 'float-start',
'float-right' => 'float-end',
'text-left' => 'text-start',
'text-sm-left' => 'text-sm-start',
'text-md-left' => 'text-md-start',
'text-lg-left' => 'text-lg-start',
'text-left' => 'text-start',
'text-sm-left' => 'text-sm-start',
'text-md-left' => 'text-md-start',
'text-lg-left' => 'text-lg-start',
'text-right' => 'text-end',
'text-sm-right' => 'text-sm-end',
'text-md-right' => 'text-md-end',
'text-lg-right' => 'text-lg-end',
'border-right' => 'border-end',
'border-left' => 'border-start',
'text-sm-right' => 'text-sm-end',
'text-md-right' => 'text-md-end',
'text-lg-right' => 'text-lg-end',
'border-right' => 'border-end',
'border-left' => 'border-start',
'font-weight-' => 'fw-',
'btn-block' => 'w-100',
'rounded-left' => 'rounded-start',
'rounded-right' => 'rounded-end',
'font-italic' => 'fst-italic',
'rounded-right' => 'rounded-end',
'font-italic' => 'fst-italic',
'"sr-only visually-hidden' => '"visually-hidden',
"'sr-only visually-hidden" => "'visually-hidden",
' sr-only visually-hidden' => ' visually-hidden',
'"sr-only' => '"visually-hidden',
"'sr-only" => "'visually-hidden",
' sr-only' => ' visually-hidden',
'"fa-fw' => '"fa-fw fa-width-fixed', // FA7 compatibility
"'fa-fw" => "'fa-fw fa-width-fixed",
' fa-fw' => ' fa-fw fa-width-fixed',
'"fa-fw' => '"fa-fw fa-width-fixed', // FA7 compatibility
"'fa-fw" => "'fa-fw fa-width-fixed",
' fa-fw' => ' fa-fw fa-width-fixed',
'fa-width-fixed fa-width-fixed' => 'fa-width-fixed',

// 'custom-control custom-checkbox' => 'form-check',
// data
' data-toggle=' => ' data-bs-toggle=',
'data-ride=' => 'data-bs-ride=',
' data-toggle=' => ' data-bs-toggle=',
'data-ride=' => 'data-bs-ride=',
'data-controlnav=' => 'data-bs-controlnav=',
'data-slide=' => 'data-bs-slide=',
'data-slide-to=' => 'data-bs-slide-to=',
'data-target=' => 'data-bs-target=',
'data-slide=' => 'data-bs-slide=',
'data-slide-to=' => 'data-bs-slide-to=',
'data-target=' => 'data-bs-target=',
'data-dismiss="modal"' => 'data-bs-dismiss="modal"',
'class="close"' => 'class="btn-close"',
'class="close"' => 'class="btn-close"',
'<span aria-hidden="true">&times;</span>' => '',
);

$output = str_replace(
array_keys( $convert ),
array_values( $convert ),
$output
);

$revert = array(
'margin-start' => 'margin-left',
'margin-end' => 'margin-right',
'padding-start' => 'padding-left',
'padding-end' => 'padding-right',
'border-start' => 'border-left',
'border-end' => 'border-right',
'float-start' => 'float-left',
'float-end' => 'float-right',
'text-start' => 'text-left',
'text-end' => 'text-right'
);

// Revert the inline style attributes.
$output = preg_replace_callback( '/(<style.*?>.*?<\/style>|style=["\'].*?["\'])/is', function ( $matches ) use ( $revert ) {
return str_replace( array_keys( $revert ), array_values( $revert ), $matches[0] );
}, $output );
}

return $output;
}

add_filter( 'wp_super_duper_widget_output', 'aui_bs_convert_sd_output', 10, 4 ); //$output, $instance, $args, $this
add_filter( 'wp_super_duper_widget_output', 'aui_bs_convert_sd_output', 10, 4 );
23 changes: 16 additions & 7 deletions vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,23 @@ function aui_time_ago(selector) {
* Initiate tooltips on the page.
*/
function aui_init_tooltips(){
jQuery('[data-toggle="tooltip"]').tooltip();
jQuery('[data-toggle="popover"]').popover();
jQuery('[data-toggle="popover-html"]').popover({
html: true
});
if (typeof jQuery.fn.tooltip === 'function') {
jQuery('[data-toggle="tooltip"]').tooltip();
} else {
console.log('jQuery.fn.tooltip not found');
}

if (typeof jQuery.fn.popover === 'function') {
jQuery('[data-toggle="popover"]').popover();
jQuery('[data-toggle="popover-html"]').popover({
html: true
});
} else {
console.log('jQuery.fn.popover not found');
}

// fix popover container compatibility
jQuery('[data-toggle="popover"],[data-toggle="popover-html"]').on('inserted.bs.popover', function () {
// Fix popover container compatibility.
jQuery('[data-toggle="popover"],[data-toggle="popover-html"]').on('inserted.bs.popover', function() {
jQuery('body > .popover').wrapAll("<div class='bsui' />");
});
}
Expand Down
23 changes: 16 additions & 7 deletions vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,24 @@ function aui_time_ago(selector) {
* Initiate tooltips on the page.
*/
function aui_init_tooltips(){
jQuery('[data-bs-toggle="tooltip"]').tooltip();
jQuery('[data-bs-toggle="popover"]').popover();
jQuery('[data-bs-toggle="popover-html"]').popover({
html: true,
sanitize: false
});
if (typeof jQuery.fn.tooltip === 'function') {
jQuery('[data-bs-toggle="tooltip"]').tooltip();
} else {
console.log('jQuery.fn.tooltip not found');
}

if (typeof jQuery.fn.popover === 'function') {
jQuery('[data-bs-toggle="popover"]').popover();
jQuery('[data-bs-toggle="popover-html"]').popover({
html: true,
sanitize: false
});
} else {
console.log('jQuery.fn.popover not found');
}

// fix popover container compatibility
jQuery('[data-bs-toggle="popover"],[data-bs-toggle="popover-html"]').on('inserted.bs.popover', function () {
jQuery('[data-bs-toggle="popover"],[data-bs-toggle="popover-html"]').on('inserted.bs.popover', function() {
jQuery('body > .popover').wrapAll("<div class='bsui' />");
});
}
Expand Down
Loading