json-rules-filter 1.0.11 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-rules-filter",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "para crear reglas avanzadas de filtrado sobre datasets JSON de forma dinámica y visual.",
5
5
  "main": "src/jquery.jsonRulesFilter.js",
6
6
  "scripts": {
@@ -19,10 +19,11 @@
19
19
  "license": "MIT",
20
20
  "type": "commonjs",
21
21
  "dependencies": {
22
- "jquery": ">=3.6.0",
23
- "select2": "^4.1.0-rc.0",
22
+ "@fortawesome/fontawesome-free": "^6.4.0",
24
23
  "bootstrap": "^5.3.0",
25
- "@fortawesome/fontawesome-free": "^6.4.0"
24
+ "jquery": ">=1.7",
25
+ "json-rules-filter": "^1.0.11",
26
+ "select2": "^4.1.0-rc.0"
26
27
  },
27
28
  "devDependencies": {
28
29
  "vite": "^4.4.0"
@@ -54,7 +54,7 @@
54
54
 
55
55
  // ---- Compatibility helper bs5/bs4 ------
56
56
  bs: function(classes) {
57
- if (this.settings.bootstrapVersion === 5) return classes;
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.bootstrapVersion === 4 ? 'data-toggle="dropdown"' : 'data-bs-toggle="dropdown"';
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.bootstrapVersion === 4 ? 'form-row' : 'row g-2';
124
- const colClass = this.settings.bootstrapVersion === 4 ? 'col-6' : 'col-6';
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,7 +158,7 @@
158
158
  this.$contenedor.append(template);
159
159
  const $dropdown = this.$contenedor.find('.dropdown-toggle');
160
160
 
161
- if (this.settings.bootstrapVersion === 4) {
161
+ if (this.settings.bsVersion === 4) {
162
162
  //BS4
163
163
  $dropdown.dropdown({
164
164
  popperConfig: {
@@ -215,8 +215,8 @@
215
215
  if (last_container.length > 0) { id_select = last_container.data("id") + 1; }
216
216
 
217
217
  // Usar 'form-group' y 'font-weight-bold' si es BS4
218
- const labelClass = this.settings.bootstrapVersion === 4 ? 'font-weight-bold' : 'form-label fw-bold';
219
- const rowClass = this.settings.bootstrapVersion === 4 ? 'form-row' : 'row';
218
+ const labelClass = this.settings.bsVersion === 4 ? 'font-weight-bold' : 'form-label fw-bold';
219
+ const rowClass = this.settings.bsVersion === 4 ? 'form-row' : 'row';
220
220
 
221
221
  // Define search input template (hidden for 'select' type)
222
222
  const searchInput = `