json-rules-filter 1.0.4 → 1.0.6
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 +1 -1
- package/readme.md +23 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -41,6 +41,28 @@ Incluye las dependencias necesarias:
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
+
Instalar via **cdn**:
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<!-- jQuery -->
|
|
48
|
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
49
|
+
|
|
50
|
+
<!-- Bootstrap (opcional, para estilos) -->
|
|
51
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
52
|
+
|
|
53
|
+
<!-- Select2 -->
|
|
54
|
+
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0/dist/css/select2.min.css" rel="stylesheet">
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0/dist/js/select2.min.js"></script>
|
|
56
|
+
|
|
57
|
+
<!-- FontAwesome (opcional para iconos) -->
|
|
58
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
|
59
|
+
|
|
60
|
+
<!-- jsonRulesFilter -->
|
|
61
|
+
<script src="https://unpkg.com/json-rules-filter@1.0.5/src/jquery.jsonRulesFilter.js" class="script_" type="text/javascript"></script>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
44
66
|
## ⚙️ Uso básico
|
|
45
67
|
|
|
46
68
|
```javascript
|
|
@@ -208,7 +230,7 @@ $("#container-rules").jsonRulesFilter(empleados, {
|
|
|
208
230
|
//generamos indicador budge para contenedor de filtros
|
|
209
231
|
$.each(reglas, function (index, element) {
|
|
210
232
|
|
|
211
|
-
let text = `${element.dataName} ${element.optionFilterText.toLowerCase()} ${element.searchValue}`;
|
|
233
|
+
let text = `${element.dataName} ${element.optionFilterText.join("").toLowerCase()} ${element.searchValue}`;
|
|
212
234
|
|
|
213
235
|
if (element.typeFilter === 'select') {
|
|
214
236
|
text = `${element.dataName} en (${element.optionFilter.join(", ").toLowerCase()})`
|