json-rules-filter 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
// ---- Compatibility helper bs5/bs4 ------
|
|
56
56
|
bs: function(classes) {
|
|
57
|
-
if (this.settings.
|
|
57
|
+
if (this.settings.bsVersion === 5) return classes;
|
|
58
58
|
|
|
59
59
|
const map = {
|
|
60
60
|
'fs-6':'',
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
render: function () {
|
|
118
118
|
const self = this;
|
|
119
119
|
// Atributo de toggle dinámico
|
|
120
|
-
const toggleAttr = this.settings.
|
|
120
|
+
const toggleAttr = this.settings.bsVersion === 4 ? 'data-toggle="dropdown"' : 'data-bs-toggle="dropdown"';
|
|
121
121
|
|
|
122
122
|
// Ajuste de Gutters para BS4 (usamos form-row en lugar de row g-2 si es BS4)
|
|
123
|
-
const rowClass = this.settings.
|
|
124
|
-
const colClass = this.settings.
|
|
123
|
+
const rowClass = this.settings.bsVersion === 4 ? 'form-row' : 'row g-2';
|
|
124
|
+
const colClass = this.settings.bsVersion === 4 ? 'col-6' : 'col-6';
|
|
125
125
|
|
|
126
126
|
let columnasHtml = `<div class="${rowClass}">`;
|
|
127
127
|
this.settings.filters.forEach((col, index) => {
|
|
@@ -158,8 +158,13 @@
|
|
|
158
158
|
this.$contenedor.append(template);
|
|
159
159
|
const $dropdown = this.$contenedor.find('.dropdown-toggle');
|
|
160
160
|
|
|
161
|
-
if (this.settings.
|
|
162
|
-
|
|
161
|
+
if (this.settings.bsVersion === 4) {
|
|
162
|
+
//BS4
|
|
163
|
+
$dropdown.dropdown({
|
|
164
|
+
popperConfig: {
|
|
165
|
+
positionFixed: true
|
|
166
|
+
}
|
|
167
|
+
});
|
|
163
168
|
} else {
|
|
164
169
|
//BS5
|
|
165
170
|
$dropdown.dropdown({
|
|
@@ -210,8 +215,8 @@
|
|
|
210
215
|
if (last_container.length > 0) { id_select = last_container.data("id") + 1; }
|
|
211
216
|
|
|
212
217
|
// Usar 'form-group' y 'font-weight-bold' si es BS4
|
|
213
|
-
const labelClass = this.settings.
|
|
214
|
-
const rowClass = this.settings.
|
|
218
|
+
const labelClass = this.settings.bsVersion === 4 ? 'font-weight-bold' : 'form-label fw-bold';
|
|
219
|
+
const rowClass = this.settings.bsVersion === 4 ? 'form-row' : 'row';
|
|
215
220
|
|
|
216
221
|
// Define search input template (hidden for 'select' type)
|
|
217
222
|
const searchInput = `
|