@likable-hair/svelte 3.0.52 → 3.0.54
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/components/composed/search/FilterEditor.svelte +1 -1
- package/dist/components/composed/search/Filters.svelte +13 -2
- package/dist/components/composed/search/MobileFilterEditor.svelte +1 -1
- package/dist/utils/filters/builder.d.ts +13 -13
- package/dist/utils/filters/filters.d.ts +1 -1
- package/dist/utils/filters/modifiers/where.d.ts +4 -3
- package/package.json +1 -1
|
@@ -288,7 +288,12 @@ function handleDeleteIconClick(e) {
|
|
|
288
288
|
>
|
|
289
289
|
<div class="drawer-content">
|
|
290
290
|
{#if !!selectedFilter && singleFilterMenuOpened}
|
|
291
|
-
<div
|
|
291
|
+
<div
|
|
292
|
+
class="drawer-filter-detail"
|
|
293
|
+
style:height="100%"
|
|
294
|
+
in:fly|local={{delay: 100, duration: 100, x: 200}}
|
|
295
|
+
out:fly|local={{duration: 100, x: -200}}
|
|
296
|
+
>
|
|
292
297
|
<MobileFilterEditor
|
|
293
298
|
bind:filter={selectedFilter}
|
|
294
299
|
bind:applyFilterLabel
|
|
@@ -307,7 +312,13 @@ function handleDeleteIconClick(e) {
|
|
|
307
312
|
</MobileFilterEditor>
|
|
308
313
|
</div>
|
|
309
314
|
{:else}
|
|
310
|
-
<div
|
|
315
|
+
<div
|
|
316
|
+
class="drawer-filter-list"
|
|
317
|
+
style:margin-top="20px"
|
|
318
|
+
style:height="100%"
|
|
319
|
+
out:fly|local={{duration: 100, x: -200}}
|
|
320
|
+
in:fly|local={{duration: 100, x: 200, delay: 100}}
|
|
321
|
+
>
|
|
311
322
|
<SelectableVerticalList
|
|
312
323
|
bind:selected
|
|
313
324
|
bind:focused
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JoinModifier } from "./modifiers/join";
|
|
2
|
-
import type { WhereModifier } from "./modifiers/where";
|
|
2
|
+
import type { WhereModifier, WhereFilterValue } from "./modifiers/where";
|
|
3
3
|
export type Modifier = WhereModifier | JoinModifier;
|
|
4
4
|
export type JsonQuery = {
|
|
5
5
|
modifiers: Modifier[];
|
|
@@ -8,21 +8,21 @@ export default class Builder {
|
|
|
8
8
|
private modifiers;
|
|
9
9
|
constructor();
|
|
10
10
|
where(callback: (builder: Builder) => void): Builder;
|
|
11
|
-
where(key: Record<string,
|
|
12
|
-
where(key: string, value:
|
|
13
|
-
where(key: string, operator: string, value:
|
|
11
|
+
where(key: Record<string, WhereFilterValue>): Builder;
|
|
12
|
+
where(key: string, value: WhereFilterValue): Builder;
|
|
13
|
+
where(key: string, operator: string, value: WhereFilterValue | boolean): Builder;
|
|
14
14
|
whereNot(callback: (builder: Builder) => void): Builder;
|
|
15
|
-
whereNot(key: Record<string,
|
|
16
|
-
whereNot(key: string, value:
|
|
17
|
-
whereNot(key: string, operator: string, value:
|
|
15
|
+
whereNot(key: Record<string, WhereFilterValue>): Builder;
|
|
16
|
+
whereNot(key: string, value: WhereFilterValue): Builder;
|
|
17
|
+
whereNot(key: string, operator: string, value: WhereFilterValue): Builder;
|
|
18
18
|
orWhere(callback: (builder: Builder) => void): Builder;
|
|
19
|
-
orWhere(key: Record<string,
|
|
20
|
-
orWhere(key: string, value:
|
|
21
|
-
orWhere(key: string, operator: string, value:
|
|
19
|
+
orWhere(key: Record<string, WhereFilterValue>): Builder;
|
|
20
|
+
orWhere(key: string, value: WhereFilterValue): Builder;
|
|
21
|
+
orWhere(key: string, operator: string, value: WhereFilterValue): Builder;
|
|
22
22
|
orWhereNot(callback: (builder: Builder) => void): Builder;
|
|
23
|
-
orWhereNot(key: Record<string,
|
|
24
|
-
orWhereNot(key: string, value:
|
|
25
|
-
orWhereNot(key: string, operator: string, value:
|
|
23
|
+
orWhereNot(key: Record<string, WhereFilterValue>): Builder;
|
|
24
|
+
orWhereNot(key: string, value: WhereFilterValue): Builder;
|
|
25
|
+
orWhereNot(key: string, operator: string, value: WhereFilterValue): Builder;
|
|
26
26
|
private applyWhereClause;
|
|
27
27
|
join(table: string, onCallback: (onBuilder: OnClauseBuilder) => void): this;
|
|
28
28
|
leftJoin(table: string, onCallback: (onBuilder: OnClauseBuilder) => void): this;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type WhereFilterValue = string | number | Date | boolean;
|
|
1
2
|
type GroupedWhere = {
|
|
2
3
|
method: 'where';
|
|
3
4
|
kind: 'grouped';
|
|
@@ -8,7 +9,7 @@ type ObjectWhere = {
|
|
|
8
9
|
method: 'where';
|
|
9
10
|
kind: 'object';
|
|
10
11
|
logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
|
|
11
|
-
values: Record<string,
|
|
12
|
+
values: Record<string, WhereFilterValue>;
|
|
12
13
|
};
|
|
13
14
|
type SimpleWhere = {
|
|
14
15
|
method: 'where';
|
|
@@ -16,14 +17,14 @@ type SimpleWhere = {
|
|
|
16
17
|
logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
|
|
17
18
|
key: string;
|
|
18
19
|
operator?: string;
|
|
19
|
-
value:
|
|
20
|
+
value: WhereFilterValue | boolean;
|
|
20
21
|
};
|
|
21
22
|
type InWhere = {
|
|
22
23
|
method: 'where';
|
|
23
24
|
kind: 'in';
|
|
24
25
|
logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
|
|
25
26
|
key: string;
|
|
26
|
-
value: (
|
|
27
|
+
value: (WhereFilterValue)[];
|
|
27
28
|
};
|
|
28
29
|
export type WhereModifier = SimpleWhere | ObjectWhere | GroupedWhere | InWhere;
|
|
29
30
|
export {};
|