@likable-hair/svelte 3.3.20 → 3.3.22

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.
@@ -18,7 +18,7 @@
18
18
  stayInViewport: ComponentProps<MenuOrDrawer>['stayInViewport'] = true,
19
19
  flipOnOverflow: ComponentProps<MenuOrDrawer>['flipOnOverflow'] = false,
20
20
  _boxShadow: string = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px",
21
- _height: string = "fit-content",
21
+ _height: string = "300px",
22
22
  _maxHeight: string | undefined = undefined,
23
23
  _minWidth: string = "100px",
24
24
  _borderRadius: string = "5px",
@@ -50,6 +50,8 @@ export default class Builder {
50
50
  private applyWhereNullClause;
51
51
  private applyWhereClause;
52
52
  private applyWhereColumnClause;
53
+ whereRaw(clause: string, bindings?: WhereFilterValue[]): Builder;
54
+ orWhereRaw(clause: string, bindings?: WhereFilterValue[]): Builder;
53
55
  private applyWhereJsonSupersetClause;
54
56
  join(table: string, onCallback: (onBuilder: OnClauseBuilder) => void): this;
55
57
  leftJoin(table: string, onCallback: (onBuilder: OnClauseBuilder) => void): this;
@@ -156,6 +156,26 @@ export default class Builder {
156
156
  }
157
157
  return this;
158
158
  }
159
+ whereRaw(clause, bindings) {
160
+ this._modifiers.push({
161
+ method: 'where',
162
+ kind: 'raw',
163
+ logicalOperator: 'and',
164
+ clause,
165
+ bindings
166
+ });
167
+ return this;
168
+ }
169
+ orWhereRaw(clause, bindings) {
170
+ this._modifiers.push({
171
+ method: 'where',
172
+ kind: 'raw',
173
+ logicalOperator: 'or',
174
+ clause,
175
+ bindings
176
+ });
177
+ return this;
178
+ }
159
179
  applyWhereJsonSupersetClause(logicalOperator, first, second) {
160
180
  this._modifiers.push({
161
181
  method: 'where',
@@ -6,7 +6,7 @@ type GroupedWhere = {
6
6
  method: 'where';
7
7
  kind: 'grouped';
8
8
  logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
9
- children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere)[];
9
+ children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | RawWhere)[];
10
10
  };
11
11
  type ObjectWhere = {
12
12
  method: 'where';
@@ -30,6 +30,13 @@ type ColumnWhere = {
30
30
  operator?: string;
31
31
  column: string;
32
32
  };
33
+ type RawWhere = {
34
+ method: 'where';
35
+ kind: 'raw';
36
+ logicalOperator?: 'and' | 'or';
37
+ clause: string;
38
+ bindings?: WhereFilterValue[];
39
+ };
33
40
  type InWhere = {
34
41
  method: 'where';
35
42
  kind: 'in';
@@ -42,7 +49,7 @@ type InBuilderWhere = {
42
49
  kind: 'inBuilder';
43
50
  logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
44
51
  key: string;
45
- children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | SelectModifier | JoinModifier | FromModifier)[];
52
+ children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | RawWhere | SelectModifier | JoinModifier | FromModifier)[];
46
53
  };
47
54
  type JsonSupersetWhere = {
48
55
  method: 'where';
@@ -57,5 +64,5 @@ type NullWhere = {
57
64
  logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
58
65
  key: string;
59
66
  };
60
- export type WhereModifier = SimpleWhere | ObjectWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere;
67
+ export type WhereModifier = SimpleWhere | ObjectWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | RawWhere;
61
68
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair and others",
4
- "version": "3.3.20",
4
+ "version": "3.3.22",
5
5
  "scripts": {
6
6
  "host": "vite --host",
7
7
  "dev": "vite dev",