qdadm 0.46.1 → 0.47.0

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": "qdadm",
3
- "version": "0.46.1",
3
+ "version": "0.47.0",
4
4
  "description": "Vue 3 framework for admin dashboards with PrimeVue",
5
5
  "author": "quazardous",
6
6
  "license": "MIT",
@@ -1,4 +1,5 @@
1
1
  import { IStorage } from './IStorage.js'
2
+ import { QueryExecutor } from '../../query/index.js'
2
3
 
3
4
  /**
4
5
  * MockApiStorage - In-memory storage with localStorage persistence
@@ -191,16 +192,9 @@ export class MockApiStorage extends IStorage {
191
192
 
192
193
  let items = this._getAll()
193
194
 
194
- // Apply filters (substring match for strings, exact match for others)
195
- for (const [key, value] of Object.entries(filters)) {
196
- if (value === null || value === undefined || value === '') continue
197
- items = items.filter(item => {
198
- const itemValue = item[key]
199
- if (typeof value === 'string' && typeof itemValue === 'string') {
200
- return itemValue.toLowerCase().includes(value.toLowerCase())
201
- }
202
- return itemValue === value
203
- })
195
+ // Apply filters using QueryExecutor (supports MongoDB-like operators)
196
+ if (Object.keys(filters).length > 0) {
197
+ items = QueryExecutor.execute(items, filters).items
204
198
  }
205
199
 
206
200
  // Apply search (substring match on all string fields)