simplesvelte 2.2.7 → 2.2.8
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/dist/ag-grid-refactored.d.ts +20 -4
- package/package.json +1 -1
|
@@ -224,10 +224,24 @@ type PrismaFilter<T> = T extends string ? T | {
|
|
|
224
224
|
};
|
|
225
225
|
/**
|
|
226
226
|
* Transform return type that constrains field names to TRecord keys
|
|
227
|
-
* and provides proper typing for Prisma filter operators based on field types
|
|
227
|
+
* and provides proper typing for Prisma filter operators based on field types.
|
|
228
|
+
* Supports OR and AND operators for complex queries.
|
|
228
229
|
*/
|
|
229
230
|
type TransformResult<TRecord> = {
|
|
230
231
|
[K in keyof TRecord]?: PrismaFilter<TRecord[K]>;
|
|
232
|
+
} & {
|
|
233
|
+
/** OR operator - at least one condition must match */
|
|
234
|
+
OR?: Array<{
|
|
235
|
+
[K in keyof TRecord]?: PrismaFilter<TRecord[K]>;
|
|
236
|
+
}>;
|
|
237
|
+
/** AND operator - all conditions must match */
|
|
238
|
+
AND?: Array<{
|
|
239
|
+
[K in keyof TRecord]?: PrismaFilter<TRecord[K]>;
|
|
240
|
+
}>;
|
|
241
|
+
/** NOT operator - inverts the condition */
|
|
242
|
+
NOT?: {
|
|
243
|
+
[K in keyof TRecord]?: PrismaFilter<TRecord[K]>;
|
|
244
|
+
};
|
|
231
245
|
};
|
|
232
246
|
/**
|
|
233
247
|
* Parsed query parameters from AG Grid request
|
|
@@ -278,7 +292,7 @@ type AGGridQueryParams = {
|
|
|
278
292
|
* }
|
|
279
293
|
* ```
|
|
280
294
|
*
|
|
281
|
-
* @example Full Name (Multi-field)
|
|
295
|
+
* @example Full Name (Multi-field with OR)
|
|
282
296
|
* ```typescript
|
|
283
297
|
* {
|
|
284
298
|
* columnId: 'fullName',
|
|
@@ -286,8 +300,10 @@ type AGGridQueryParams = {
|
|
|
286
300
|
* transform: (name) => {
|
|
287
301
|
* const [first, last] = name.split(' ')
|
|
288
302
|
* return {
|
|
289
|
-
*
|
|
290
|
-
*
|
|
303
|
+
* OR: [
|
|
304
|
+
* { firstName: { contains: first, mode: 'insensitive' } },
|
|
305
|
+
* { lastName: { contains: last || first, mode: 'insensitive' } }
|
|
306
|
+
* ]
|
|
291
307
|
* }
|
|
292
308
|
* }
|
|
293
309
|
* }
|