@wix/wix-data-items-common 1.0.185 → 1.0.186
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/cjs/api/expressions/Expression.js +38 -37
- package/dist/cjs/api/expressions/Expression.js.map +1 -1
- package/dist/cjs/api/expressions/expressions.js +18 -18
- package/dist/cjs/api/expressions/expressions.js.map +1 -1
- package/dist/cjs/api/stages/FilterStage.js +5 -4
- package/dist/cjs/api/stages/FilterStage.js.map +1 -1
- package/dist/cjs/api/stages/GroupStage.js +5 -4
- package/dist/cjs/api/stages/GroupStage.js.map +1 -1
- package/dist/cjs/api/stages/LimitStage.js +4 -3
- package/dist/cjs/api/stages/LimitStage.js.map +1 -1
- package/dist/cjs/api/stages/ObjectToArrayStage.js +4 -3
- package/dist/cjs/api/stages/ObjectToArrayStage.js.map +1 -1
- package/dist/cjs/api/stages/ProjectStage.js +4 -3
- package/dist/cjs/api/stages/ProjectStage.js.map +1 -1
- package/dist/cjs/api/stages/SkipStage.js +4 -3
- package/dist/cjs/api/stages/SkipStage.js.map +1 -1
- package/dist/cjs/api/stages/SortStage.js +4 -3
- package/dist/cjs/api/stages/SortStage.js.map +1 -1
- package/dist/cjs/api/stages/UnwindStage.js +4 -3
- package/dist/cjs/api/stages/UnwindStage.js.map +1 -1
- package/dist/cjs/api/stages/stages.js +8 -8
- package/dist/cjs/api/stages/stages.js.map +1 -1
- package/dist/esm/api/expressions/Expression.js +18 -72
- package/dist/esm/api/expressions/Expression.js.map +1 -1
- package/dist/esm/api/expressions/expressions.js +19 -19
- package/dist/esm/api/expressions/expressions.js.map +1 -1
- package/dist/esm/api/index.js +0 -8
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/stages/FilterStage.js +2 -5
- package/dist/esm/api/stages/FilterStage.js.map +1 -1
- package/dist/esm/api/stages/GroupStage.js +3 -6
- package/dist/esm/api/stages/GroupStage.js.map +1 -1
- package/dist/esm/api/stages/LimitStage.js +1 -4
- package/dist/esm/api/stages/LimitStage.js.map +1 -1
- package/dist/esm/api/stages/ObjectToArrayStage.js +1 -4
- package/dist/esm/api/stages/ObjectToArrayStage.js.map +1 -1
- package/dist/esm/api/stages/ProjectStage.js +1 -4
- package/dist/esm/api/stages/ProjectStage.js.map +1 -1
- package/dist/esm/api/stages/SkipStage.js +1 -4
- package/dist/esm/api/stages/SkipStage.js.map +1 -1
- package/dist/esm/api/stages/SortStage.js +1 -4
- package/dist/esm/api/stages/SortStage.js.map +1 -1
- package/dist/esm/api/stages/UnwindStage.js +1 -4
- package/dist/esm/api/stages/UnwindStage.js.map +1 -1
- package/dist/esm/api/stages/stages.js +16 -16
- package/dist/esm/api/stages/stages.js.map +1 -1
- package/dist/types/api/expressions/Expression.d.ts +54 -18
- package/dist/types/api/expressions/Expression.d.ts.map +1 -1
- package/dist/types/api/expressions/expressions.d.ts.map +1 -1
- package/dist/types/api/stages/FilterStage.d.ts +418 -3
- package/dist/types/api/stages/FilterStage.d.ts.map +1 -1
- package/dist/types/api/stages/GroupStage.d.ts +13 -2
- package/dist/types/api/stages/GroupStage.d.ts.map +1 -1
- package/dist/types/api/stages/LimitStage.d.ts +3 -1
- package/dist/types/api/stages/LimitStage.d.ts.map +1 -1
- package/dist/types/api/stages/ObjectToArrayStage.d.ts +3 -1
- package/dist/types/api/stages/ObjectToArrayStage.d.ts.map +1 -1
- package/dist/types/api/stages/ProjectStage.d.ts +11 -1
- package/dist/types/api/stages/ProjectStage.d.ts.map +1 -1
- package/dist/types/api/stages/SkipStage.d.ts +3 -1
- package/dist/types/api/stages/SkipStage.d.ts.map +1 -1
- package/dist/types/api/stages/SortStage.d.ts +5 -1
- package/dist/types/api/stages/SortStage.d.ts.map +1 -1
- package/dist/types/api/stages/UnwindStage.d.ts +3 -1
- package/dist/types/api/stages/UnwindStage.d.ts.map +1 -1
- package/dist/types/api/stages/stages.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,432 @@
|
|
|
1
1
|
import { QueryBase } from '../QueryBase';
|
|
2
|
-
import { PlatformizedFilterBuilder } from '../../filter';
|
|
2
|
+
import { PlatformizedFilterBuilder, WithFilter } from '../../filter';
|
|
3
3
|
import * as apiTypes from '../../types/data-item-types';
|
|
4
4
|
import { PipelineStage } from './stages';
|
|
5
|
+
type Comparable = string | number | Date;
|
|
5
6
|
/**
|
|
6
7
|
* @builder
|
|
7
8
|
*/
|
|
8
|
-
export
|
|
9
|
+
export interface FilterStage extends PipelineStage, WithFilter<FilterStage> {
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
readonly filterTree: Record<string, any>;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
readonly invalidArguments: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Refines a filter to match items whose specified field value equals the specified value.
|
|
20
|
+
*
|
|
21
|
+
* The `eq()` method refines this filter to only
|
|
22
|
+
* match items where the value of the specified field equals the specified `value`.
|
|
23
|
+
*
|
|
24
|
+
* It only matches values of the same type. For example, a number value stored
|
|
25
|
+
* as a String type does not match the same number stored as a Number type.
|
|
26
|
+
*
|
|
27
|
+
* Matching strings with `eq()` is case sensitive, so `"text"` is not equal to `"Text"`.
|
|
28
|
+
*
|
|
29
|
+
* If `field` points to a collection field of type array, `eq()` includes the item as long as at least one array element matches the specified `value`.
|
|
30
|
+
* @public
|
|
31
|
+
* @documentationMaturity preview
|
|
32
|
+
* @param field - Field whose value is compared with `value`.
|
|
33
|
+
* @requiredField field
|
|
34
|
+
* @param value - Value to compare with.
|
|
35
|
+
* @requiredField value
|
|
36
|
+
* @returns Refined filter.
|
|
37
|
+
*/
|
|
38
|
+
eq(field: string, value: any): FilterStage;
|
|
39
|
+
/**
|
|
40
|
+
* Refines a filter to match items whose specified field value does not equal the specified value.
|
|
41
|
+
*
|
|
42
|
+
* The `ne()` method refines this filter to only
|
|
43
|
+
* match items where the value of the specified field does not equal the specified `value`.
|
|
44
|
+
*
|
|
45
|
+
* It only matches values of the same type. For example, a number value stored
|
|
46
|
+
* as a String type is considered not equal to the same number stored as a Number type.
|
|
47
|
+
*
|
|
48
|
+
* Matching strings with `ne()` is case sensitive, so `"text"` is not equal to `"Text"`.
|
|
49
|
+
*
|
|
50
|
+
* If the value of `field` is an array, `ne()` includes items
|
|
51
|
+
* in which none of the elements of the array match the specified `value`.
|
|
52
|
+
* @public
|
|
53
|
+
* @documentationMaturity preview
|
|
54
|
+
* @param field - Field whose value is compared with `value`.
|
|
55
|
+
* @requiredField field
|
|
56
|
+
* @param value - Value to match.
|
|
57
|
+
* @requiredField value
|
|
58
|
+
* @returns Refined filter.
|
|
59
|
+
*/
|
|
60
|
+
ne(field: string, value: any): FilterStage;
|
|
61
|
+
/**
|
|
62
|
+
* Refines a filter to match items whose specified field value is greater than or equal to the specified
|
|
63
|
+
* value.
|
|
64
|
+
*
|
|
65
|
+
* The `ge()` method refines this filter to only
|
|
66
|
+
* match items where the value of the specified field is greater than or
|
|
67
|
+
* equal to the specified `value`.
|
|
68
|
+
*
|
|
69
|
+
* It only matches values of the same type. For example, a number value stored
|
|
70
|
+
* as a String type does not match the same number stored as a Number type.
|
|
71
|
+
*
|
|
72
|
+
* If a field contains a number as a String, that value is compared
|
|
73
|
+
* alphabetically and not numerically. Items that do not have a value for the
|
|
74
|
+
* specified field are ranked lowest.
|
|
75
|
+
*
|
|
76
|
+
* The following field types can be compared:
|
|
77
|
+
* - Number: Compares numerically.
|
|
78
|
+
* - Date: Compares JavaScript Date objects.
|
|
79
|
+
* - String: Compares lexicographically,
|
|
80
|
+
* so `"abc"` is greater than or equal to `"ABC"` (because of the greater than),
|
|
81
|
+
* but `"ABC"` is not greater than or equal to `"abc"`.
|
|
82
|
+
* - Reference: Compares by the ID of the referenced item as a String.
|
|
83
|
+
* @public
|
|
84
|
+
* @documentationMaturity preview
|
|
85
|
+
* @param field - Field whose value is compared with `value`.
|
|
86
|
+
* @requiredField field
|
|
87
|
+
* @param value - Value to match.
|
|
88
|
+
* @requiredField value
|
|
89
|
+
* @returns Refined filter.
|
|
90
|
+
*/
|
|
91
|
+
ge(field: string, value: string | number | Date): FilterStage;
|
|
92
|
+
/**
|
|
93
|
+
* Refines a filter to match items whose specified field value is greater than the specified value.
|
|
94
|
+
*
|
|
95
|
+
* The `gt()` method refines this filter to only match
|
|
96
|
+
* items where the value of the specified field is greater than the specified `value`.
|
|
97
|
+
*
|
|
98
|
+
* It only matches values of the same type. For example, a number value stored
|
|
99
|
+
* as a String type does not match the same number stored as a Number type.
|
|
100
|
+
*
|
|
101
|
+
* If a field contains a number as a String, that value is compared
|
|
102
|
+
* alphabetically and not numerically. Items that do not have a value for the
|
|
103
|
+
* specified field are ranked lowest.
|
|
104
|
+
*
|
|
105
|
+
* The following field types can be compared:
|
|
106
|
+
* - Number: Compares numerically.
|
|
107
|
+
* - Date: Compares JavaScript Date objects.
|
|
108
|
+
* - String: Compares lexicographically, so `"text"` is greater than `"Text"`.
|
|
109
|
+
* - Reference: Compares by the ID of the referenced item as a String.
|
|
110
|
+
* @public
|
|
111
|
+
* @documentationMaturity preview
|
|
112
|
+
* @param field - Field whose value is compared with `value`.
|
|
113
|
+
* @requiredField field
|
|
114
|
+
* @param value - Value to match.
|
|
115
|
+
* @requiredField value
|
|
116
|
+
* @returns An object with the filter definition, based on the supplied parameters.
|
|
117
|
+
*/
|
|
118
|
+
gt(field: string, value: string | number | Date): FilterStage;
|
|
119
|
+
/**
|
|
120
|
+
* Refines a filter to match items whose specified field value is less than or equal to the specified
|
|
121
|
+
* value.
|
|
122
|
+
*
|
|
123
|
+
* The `le()` method refines this filter to only match
|
|
124
|
+
* items where the value of the specified field is less than or equal to the
|
|
125
|
+
* specified `value`.
|
|
126
|
+
*
|
|
127
|
+
* It only matches values of the same type. For example, a number value stored
|
|
128
|
+
* as a String type does not match the same number stored as a Number type.
|
|
129
|
+
*
|
|
130
|
+
* If a field contains a number as a String, that value is compared
|
|
131
|
+
* alphabetically and not numerically. Items that do not have a value for the
|
|
132
|
+
* specified field are ranked lowest.
|
|
133
|
+
*
|
|
134
|
+
* The following field types can be compared:
|
|
135
|
+
* - Number: Compares numerically.
|
|
136
|
+
* - Date: Compares JavaScript Date objects.
|
|
137
|
+
* - String: Compares lexicographically,
|
|
138
|
+
* so `"ABC"` is less than or equal to `"abc"` (because of the less than),
|
|
139
|
+
* but `"abc"` is not less than or equal to `"ABC"`.
|
|
140
|
+
* - Reference: Compares by the ID of the referenced item as a String.
|
|
141
|
+
* @public
|
|
142
|
+
* @documentationMaturity preview
|
|
143
|
+
* @param field - Field whose value is compared with `value`.
|
|
144
|
+
* @requiredField field
|
|
145
|
+
* @param value - Value to match.
|
|
146
|
+
* @requiredField value
|
|
147
|
+
* @returns Refined filter.
|
|
148
|
+
*/
|
|
149
|
+
le(field: string, value: string | number | Date): FilterStage;
|
|
150
|
+
/**
|
|
151
|
+
* Refines a filter to match items whose specified field value is less than the specified value.
|
|
152
|
+
*
|
|
153
|
+
* The `lt()` method refines this filter to only match
|
|
154
|
+
* items where the value of the specified field is less than the specified `value`.
|
|
155
|
+
*
|
|
156
|
+
* It only matches values of the same type. For example, a number value stored
|
|
157
|
+
* as a String type does not match the same number stored as a Number type.
|
|
158
|
+
*
|
|
159
|
+
* If a field contains a number as a String, that value is compared
|
|
160
|
+
* alphabetically and not numerically. Items that do not have a value for the
|
|
161
|
+
* specified field are ranked lowest.
|
|
162
|
+
*
|
|
163
|
+
* The following field types can be compared:
|
|
164
|
+
* - Number: Compares numerically.
|
|
165
|
+
* - Date: Compares JavaScript Date objects.
|
|
166
|
+
* - String: Compares lexicographically, so `"Text"` is less than `"text"`.
|
|
167
|
+
* - Reference: Compares by the ID of the referenced item as a String.
|
|
168
|
+
* @public
|
|
169
|
+
* @documentationMaturity preview
|
|
170
|
+
* @param field - Field whose value is compared with `value`.
|
|
171
|
+
* @requiredField field
|
|
172
|
+
* @param value - Value to match.
|
|
173
|
+
* @requiredField value
|
|
174
|
+
* @returns An object with the filter definition, based on the supplied parameters.
|
|
175
|
+
*/
|
|
176
|
+
lt(field: string, value: string | number | Date): FilterStage;
|
|
177
|
+
/**
|
|
178
|
+
* Refines a filter to match items whose specified field has any value.
|
|
179
|
+
*
|
|
180
|
+
* The `isNotEmpty()` method refines this filter to only match items where the
|
|
181
|
+
* value of the specified field is not `null` or `undefined`.
|
|
182
|
+
*
|
|
183
|
+
* If the field contains any value at all for a given item, including the
|
|
184
|
+
* empty string or an invalid value, that item will match the filter.
|
|
185
|
+
* @public
|
|
186
|
+
* @documentationMaturity preview
|
|
187
|
+
* @param field - Field in which to check for a value.
|
|
188
|
+
* @requiredField field
|
|
189
|
+
* @returns Refined filter.
|
|
190
|
+
*/
|
|
191
|
+
isNotEmpty(field: string): FilterStage;
|
|
192
|
+
/**
|
|
193
|
+
* Refines a filter to match items whose specified field does not exist or does not have any value.
|
|
194
|
+
*
|
|
195
|
+
* The `isEmpty()` method refines this filter to only match items where the
|
|
196
|
+
* value of the specified field is `null` or `undefined` or the field does
|
|
197
|
+
* not exist.
|
|
198
|
+
*
|
|
199
|
+
* If the field contains any value at all for a given item, including the
|
|
200
|
+
* empty string or an invalid value, that item will match the filter.
|
|
201
|
+
* @public
|
|
202
|
+
* @documentationMaturity preview
|
|
203
|
+
* @param field - Field in which to check for a value.
|
|
204
|
+
* @requiredField field
|
|
205
|
+
* @returns An object representing the refined filter.
|
|
206
|
+
*/
|
|
207
|
+
isEmpty(field: string): FilterStage;
|
|
208
|
+
/**
|
|
209
|
+
* Refines a filter to match items whose specified field value starts with a specified string.
|
|
210
|
+
*
|
|
211
|
+
* The `startsWith()` method refines this filter to
|
|
212
|
+
* only match items where the value of the specified field starts with the
|
|
213
|
+
* defined `string`. Matching with `startsWith()` is not case sensitive, so `"TEXT"` starts
|
|
214
|
+
* with `"tex"`.
|
|
215
|
+
*
|
|
216
|
+
* You can only use `startsWith()` with a field whose value is a String or Reference.
|
|
217
|
+
* When using a Reference, `startsWith()` matches by the ID of the referenced item as Strings.
|
|
218
|
+
* @public
|
|
219
|
+
* @documentationMaturity preview
|
|
220
|
+
* @param field - Field whose value is compared with the `value` parameter.
|
|
221
|
+
* @requiredField field
|
|
222
|
+
* @param value - Value to look for at the beginning of the specified field value.
|
|
223
|
+
* @requiredField value
|
|
224
|
+
* @returns Refined filter.
|
|
225
|
+
*/
|
|
226
|
+
startsWith(field: string, value: string): FilterStage;
|
|
227
|
+
/**
|
|
228
|
+
* Refines a filter to match items whose specified field value ends with a specified string.
|
|
229
|
+
*
|
|
230
|
+
* The `endsWith()` method refines this filter to only
|
|
231
|
+
* match items where the value of the specified field ends with the specified
|
|
232
|
+
* `string`. Matching with `endsWith()` is not case sensitive, so `"TEXT"` ends
|
|
233
|
+
* with `"ext"`.
|
|
234
|
+
*
|
|
235
|
+
* You can only use `endsWith()` with a field whose value is a String or Reference.
|
|
236
|
+
* When using a Reference, `endsWith()` matches by the ID of the referenced item as Strings.
|
|
237
|
+
* @public
|
|
238
|
+
* @documentationMaturity preview
|
|
239
|
+
* @param field - Field whose value is compared with the string.
|
|
240
|
+
* @requiredField field
|
|
241
|
+
* @param value - Value to look for at the end of the specified field value.
|
|
242
|
+
* @requiredField value
|
|
243
|
+
* @returns Refined filter.
|
|
244
|
+
*/
|
|
245
|
+
endsWith(field: string, value: string): FilterStage;
|
|
246
|
+
/**
|
|
247
|
+
* Refines a filter to match items whose specified field value contains the specified value.
|
|
248
|
+
*
|
|
249
|
+
* The `contains()` method refines the filter to only match items for which the value of the specified field contains the specified value. `contains()` is not case-sensitive, so the value `sunday` is considered to contain the value `Sun`.
|
|
250
|
+
*
|
|
251
|
+
* You can use `contains()` with a field whose type is a string or a reference. However, for fields whose type is reference, `contains()` matches by the ID of the referenced item as a string. Instead, use the [`eq()`](https://dev.wix.com/docs/sdk/backend-modules/data/wix-data-items-sdk-1-0-0/wix-data-filter/eq) method.
|
|
252
|
+
* @public
|
|
253
|
+
* @documentationMaturity preview
|
|
254
|
+
* @param field - Field whose value is compared with the provided value.
|
|
255
|
+
* @requiredField field
|
|
256
|
+
* @param value - Value to locate in the specified field value.
|
|
257
|
+
* @requiredField value
|
|
258
|
+
* @returns Refined filter.
|
|
259
|
+
*/
|
|
260
|
+
contains(field: string, value: string): FilterStage;
|
|
261
|
+
/**
|
|
262
|
+
* Refines a filter to match items whose specified field value equals any of the specified `values`
|
|
263
|
+
* parameters.
|
|
264
|
+
*
|
|
265
|
+
* The `hasSome()` method refines this filter to
|
|
266
|
+
* only match items where the value of the specified field equals any of
|
|
267
|
+
* the specified values.
|
|
268
|
+
*
|
|
269
|
+
* Matching strings with `hasSome()` is case sensitive, so `"text"` is not equal to `"Text"`.
|
|
270
|
+
*
|
|
271
|
+
* If the value of the specified field is an array, `hasSome()` will match
|
|
272
|
+
* if any of the elements of that array match any of the specified values.
|
|
273
|
+
*
|
|
274
|
+
* If the specified field contains multiple references, pass item IDs in the
|
|
275
|
+
* `value` field. In such a case, `hasSome()` will match if any of the
|
|
276
|
+
* multiple references match any of the specified ID values.
|
|
277
|
+
*
|
|
278
|
+
* You can specify a list of values to match by providing an array of
|
|
279
|
+
* String, Number, or Date types as the `value` parameters.
|
|
280
|
+
* @public
|
|
281
|
+
* @documentationMaturity preview
|
|
282
|
+
* @param field - Field whose value is compared with `value`.
|
|
283
|
+
* @requiredField field
|
|
284
|
+
* @param values - Values to match.
|
|
285
|
+
* @requiredField values
|
|
286
|
+
* @returns An object representing the refined filter.
|
|
287
|
+
*/
|
|
288
|
+
hasSome(field: string, ...values: Comparable[]): FilterStage;
|
|
289
|
+
/**
|
|
290
|
+
* Overload for `hasSome()`
|
|
291
|
+
* @public
|
|
292
|
+
* @documentationMaturity preview
|
|
293
|
+
*/
|
|
294
|
+
hasSome(field: string, values: Comparable[]): FilterStage;
|
|
295
|
+
/**
|
|
296
|
+
* Refines a filter to match items whose specified field values equals all of the specified `value`
|
|
297
|
+
* parameters.
|
|
298
|
+
*
|
|
299
|
+
* The `hasAll()` method refines this filter to
|
|
300
|
+
* only match items where the value of the specified field equals all of
|
|
301
|
+
* the specified values.
|
|
302
|
+
*
|
|
303
|
+
* Matching strings with `hasAll()` is case sensitive, so `"text"` is not equal to `"Text"`.
|
|
304
|
+
*
|
|
305
|
+
* If the value of the specified field is an array, `hasAll()` will match
|
|
306
|
+
* if there is a match in the elements of that array for all of the specified
|
|
307
|
+
* values.
|
|
308
|
+
*
|
|
309
|
+
* You can specify a list of values to match by providing an array of
|
|
310
|
+
* String, Number, or Date types as the `value` parameters.
|
|
311
|
+
* @public
|
|
312
|
+
* @documentationMaturity preview
|
|
313
|
+
* @param field - Field whose value is compared with `values`.
|
|
314
|
+
* @requiredField field
|
|
315
|
+
* @param values - Values to match.
|
|
316
|
+
* @requiredField values
|
|
317
|
+
* @returns An object representing the refined filter.
|
|
318
|
+
*/
|
|
319
|
+
hasAll(field: string, ...values: Comparable[]): FilterStage;
|
|
320
|
+
/**
|
|
321
|
+
* Overload for `hasAll()`
|
|
322
|
+
* @public
|
|
323
|
+
* @documentationMaturity preview
|
|
324
|
+
*/
|
|
325
|
+
hasAll(field: string, values: Comparable[]): FilterStage;
|
|
326
|
+
/**
|
|
327
|
+
* Adds an `or` condition to the filter.
|
|
328
|
+
*
|
|
329
|
+
* The `or()` method adds an inclusive `or` condition to this filter. A filter
|
|
330
|
+
* with an `or` returns all the items that match the filter as defined up to
|
|
331
|
+
* the `or` method, the items that match the filter passed to the `or`
|
|
332
|
+
* method, and the items that match both.
|
|
333
|
+
*
|
|
334
|
+
* The `or()` method is designed to work with 2 or more queries or filters.
|
|
335
|
+
* If you use it on its own, it will return all the items in a collection.
|
|
336
|
+
* @public
|
|
337
|
+
* @documentationMaturity preview
|
|
338
|
+
* @param filter - Filter to add to the initial filter as an `or` condition.
|
|
339
|
+
* @requiredField filter
|
|
340
|
+
* @returns Object representing the refined filter.
|
|
341
|
+
*/
|
|
342
|
+
or(filter: FilterStage): FilterStage;
|
|
343
|
+
/**
|
|
344
|
+
* Adds an `and` condition to the filter.
|
|
345
|
+
*
|
|
346
|
+
* A filter with an `and` condition returns all items that meet the conditions defined on both sides of the condition.
|
|
347
|
+
*
|
|
348
|
+
* Use the `and()` method when performing compound queries. For example, the final filter in this set of
|
|
349
|
+
* queries returns results where status is either pending or rejected **and** age is either less than 25 or greater
|
|
350
|
+
* than 65.
|
|
351
|
+
*
|
|
352
|
+
* ```js
|
|
353
|
+
* let statusFilter = items.filter()
|
|
354
|
+
* .eq("status", "pending")
|
|
355
|
+
* .or(items.filter().eq("status", "rejected"));
|
|
356
|
+
*
|
|
357
|
+
* let ageFilter = items.filter()
|
|
358
|
+
* .lt("age", 25)
|
|
359
|
+
* .or(items.filter().gt("age", 65));
|
|
360
|
+
*
|
|
361
|
+
* let statusAndAgeFilter = statusFilter.and(ageFilter);
|
|
362
|
+
* ```
|
|
363
|
+
*
|
|
364
|
+
* > **Notes**:
|
|
365
|
+
* > - The `and()` method is designed to work with 2 or more queries or filters. If used with a single query or filter, it returns all items in a collection.
|
|
366
|
+
* > - When chaining multiple `FilterStage` methods to a filter, an `and` condition is implied. In such cases, you do not need to call the `and()` method explicitly. For example, this filter returns results where an item `status` is `active` and `age` is greater than 25:
|
|
367
|
+
*
|
|
368
|
+
* ```js
|
|
369
|
+
* items.filter().eq("status", "active").gt("age", 25);
|
|
370
|
+
* ```
|
|
371
|
+
*
|
|
372
|
+
* @public
|
|
373
|
+
* @documentationMaturity preview
|
|
374
|
+
* @param filter - `FilterStage` used with an `and` condition.
|
|
375
|
+
* @requiredField filter
|
|
376
|
+
* @returns The compound filter.
|
|
377
|
+
*/
|
|
378
|
+
and(filter: FilterStage): FilterStage;
|
|
379
|
+
/**
|
|
380
|
+
* Adds a `not` condition to the filter.
|
|
381
|
+
*
|
|
382
|
+
* The `not()` method adds a `not` condition to this filter. A filter with a `not`
|
|
383
|
+
* returns all the items that match the filter as defined up to the `not`
|
|
384
|
+
* method, but don't match the filter passed to the `not` method.
|
|
385
|
+
*
|
|
386
|
+
* If the filter only contains a `not()` method, it returns all the items
|
|
387
|
+
* that don't match the filter defined by the `not` method.
|
|
388
|
+
*
|
|
389
|
+
* @public
|
|
390
|
+
* @documentationMaturity preview
|
|
391
|
+
* @param filter - Filter to add to the initial filter as a `not` condition.
|
|
392
|
+
* @requiredField filter
|
|
393
|
+
* @returns Object representing the refined filter.
|
|
394
|
+
*/
|
|
395
|
+
not(filter: FilterStage): FilterStage;
|
|
396
|
+
/**
|
|
397
|
+
* Refines a filter to match items whose specified field value is within the defined range.
|
|
398
|
+
*
|
|
399
|
+
* The `between()` method refines this filter to match items for which the value of the specified field is greater than or equal to `rangeStart` and less than `rangeEnd`. The method only matches values of [the same type](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-type).
|
|
400
|
+
*
|
|
401
|
+
* The following types can be compared:
|
|
402
|
+
* - Number: Compared numerically.
|
|
403
|
+
* - Date: Compared as JavaScript Date objects.
|
|
404
|
+
* - String: Compared lexicographically:
|
|
405
|
+
* - `"A"` and `"M"` are considered between `"A"` and `"Z"`, but `"a"`, `"m"`, `"z"` and `"Z"` are not.
|
|
406
|
+
* - `"A"`, `"M"`, `"Z"`, and `"a"` are considered between `"A"` and `"z"`, but `"z"` is not.
|
|
407
|
+
*
|
|
408
|
+
* > **Note**: Items that do not have a value for the specified field are considered as the lowest comparable value and are ranked last.
|
|
409
|
+
*
|
|
410
|
+
* @public
|
|
411
|
+
* @documentationMaturity preview
|
|
412
|
+
* @param field - Field to compare with `rangeStart` and `rangeEnd`.
|
|
413
|
+
* @requiredField field
|
|
414
|
+
* @param rangeStart - Starting value of the range to match.
|
|
415
|
+
* @requiredField rangeStart
|
|
416
|
+
* @param rangeEnd - Ending value of the range to match.
|
|
417
|
+
* @requiredField rangeEnd
|
|
418
|
+
* @returns Refined filter.
|
|
419
|
+
*/
|
|
420
|
+
between(field: string, rangeStart: string | number | Date, rangeEnd: string | number | Date): FilterStage;
|
|
421
|
+
}
|
|
422
|
+
export declare class FilterStageImpl extends QueryBase<FilterStageImpl> implements FilterStage {
|
|
9
423
|
constructor(origin?: {
|
|
10
424
|
collectionName?: string;
|
|
11
425
|
filterBuilder?: PlatformizedFilterBuilder;
|
|
12
426
|
});
|
|
13
|
-
protected copy(params: any):
|
|
427
|
+
protected copy(params: any): FilterStageImpl;
|
|
14
428
|
get invalidArguments(): string[];
|
|
15
429
|
toProto(): apiTypes.Stage;
|
|
16
430
|
}
|
|
431
|
+
export {};
|
|
17
432
|
//# sourceMappingURL=FilterStage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/FilterStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"FilterStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/FilterStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,aAAa,EAAE,UAAU,CAAC,WAAW,CAAC;IACzE;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAExC;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAEnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,WAAW,CAAA;IAE1C;;;;;;;;;;;;;;;;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
4
|
/**
|
|
5
5
|
* @builder
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface GroupStage extends PipelineStage {
|
|
8
|
+
by(...expressions: Expression[]): GroupStage;
|
|
9
|
+
sum(expression: Expression): GroupFieldBuilder;
|
|
10
|
+
avg(expression: Expression): GroupFieldBuilder;
|
|
11
|
+
min(expression: Expression): GroupFieldBuilder;
|
|
12
|
+
max(expression: Expression): GroupFieldBuilder;
|
|
13
|
+
count(): GroupFieldBuilder;
|
|
14
|
+
first(expression: Expression): GroupFieldBuilder;
|
|
15
|
+
last(expression: Expression): GroupFieldBuilder;
|
|
16
|
+
push(expression: Expression): GroupFieldBuilder;
|
|
17
|
+
}
|
|
18
|
+
export declare class GroupStageImpl implements GroupStage {
|
|
8
19
|
private ids;
|
|
9
20
|
private accumulators;
|
|
10
21
|
by(...expressions: Expression[]): GroupStage;
|
|
@@ -23,7 +34,7 @@ export declare class GroupFieldBuilder {
|
|
|
23
34
|
private stage;
|
|
24
35
|
private expression;
|
|
25
36
|
private type;
|
|
26
|
-
constructor(stage:
|
|
37
|
+
constructor(stage: GroupStageImpl, expression: Expression, type: AccumulatorType);
|
|
27
38
|
as(resultFieldName: string): GroupStage;
|
|
28
39
|
}
|
|
29
40
|
type AccumulatorType = 'avg' | 'min' | 'max' | 'sum' | 'first' | 'last' | 'push';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/GroupStage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"GroupStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/GroupStage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEX,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,UAAW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E1B,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,IAAI;gBAFJ,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,eAAe;IAG/B,EAAE,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU;CAOxC;AAED,KAAK,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA"}
|
|
@@ -3,7 +3,9 @@ import * as apiTypes from '../../types/data-item-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @builder
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface LimitStage extends PipelineStage {
|
|
7
|
+
}
|
|
8
|
+
export declare class LimitStageImpl implements LimitStage {
|
|
7
9
|
private count;
|
|
8
10
|
constructor(count: number);
|
|
9
11
|
toProto(): apiTypes.Stage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/LimitStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"LimitStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/LimitStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;CAAG;AAEpD,qBAAa,cAAe,YAAW,UAAU;IACnC,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,MAAM;IAEjC,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
|
|
@@ -3,7 +3,9 @@ import { PipelineStage } from './stages';
|
|
|
3
3
|
/**
|
|
4
4
|
* @builder
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface ObjectToArrayStage extends PipelineStage {
|
|
7
|
+
}
|
|
8
|
+
export declare class ObjectToArrayStageImpl implements ObjectToArrayStage {
|
|
7
9
|
private arrayFieldName;
|
|
8
10
|
private destinationFieldName;
|
|
9
11
|
constructor(arrayFieldName: string, destinationFieldName: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectToArrayStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ObjectToArrayStage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"ObjectToArrayStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ObjectToArrayStage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,aAAa;CAAG;AAE5D,qBAAa,sBAAuB,YAAW,kBAAkB;IAE7D,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,oBAAoB;gBADpB,cAAc,EAAE,MAAM,EACtB,oBAAoB,EAAE,MAAM;IAGtC,OAAO,IAAI,QAAQ,CAAC,KAAK;CAQ1B"}
|
|
@@ -4,7 +4,17 @@ import { PipelineStage } from './stages';
|
|
|
4
4
|
/**
|
|
5
5
|
* @builder
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface ProjectStage extends PipelineStage {
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
fields: apiTypes.Field[];
|
|
12
|
+
include(...fieldNames: string[]): ProjectStage;
|
|
13
|
+
exclude(...fieldNames: string[]): ProjectStage;
|
|
14
|
+
with(expression: Expression, fieldName: string): ProjectStage;
|
|
15
|
+
withNested(stage: ProjectStage, fieldName: string): ProjectStage;
|
|
16
|
+
}
|
|
17
|
+
export declare class ProjectStageImpl implements ProjectStage {
|
|
8
18
|
fields: apiTypes.Field[];
|
|
9
19
|
include(...fieldNames: string[]): ProjectStage;
|
|
10
20
|
exclude(...fieldNames: string[]): ProjectStage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"ProjectStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAA;IAExB,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAA;IAC9C,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAA;IAC9C,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAAA;IAC7D,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAAA;CACjE;AAED,qBAAa,gBAAiB,YAAW,YAAY;IACnD,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAK;IAE7B,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY;IAO9C,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY;IAO9C,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY;IAK7D,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY;IAIhE,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,wBAAwB;IAQhC,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
|
|
@@ -3,7 +3,9 @@ import * as apiTypes from '../../types/data-item-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @builder
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface SkipStage extends PipelineStage {
|
|
7
|
+
}
|
|
8
|
+
export declare class SkipStageImpl implements SkipStage {
|
|
7
9
|
private count;
|
|
8
10
|
constructor(count: number);
|
|
9
11
|
toProto(): apiTypes.Stage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkipStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/SkipStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"SkipStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/SkipStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa;CAAG;AAEnD,qBAAa,aAAc,YAAW,SAAS;IACjC,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,MAAM;IAEjC,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
|
|
@@ -3,7 +3,11 @@ import * as apiTypes from '../../types/data-item-types';
|
|
|
3
3
|
/**
|
|
4
4
|
* @builder
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface SortStage extends PipelineStage {
|
|
7
|
+
ascending(...fields: string[]): SortStage;
|
|
8
|
+
descending(...fields: string[]): SortStage;
|
|
9
|
+
}
|
|
10
|
+
export declare class SortStageImpl implements SortStage {
|
|
7
11
|
private sortFields;
|
|
8
12
|
ascending(...fields: string[]): SortStage;
|
|
9
13
|
descending(...fields: string[]): SortStage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/SortStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"SortStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/SortStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,SAAS,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IACzC,UAAU,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAC3C;AAED,qBAAa,aAAc,YAAW,SAAS;IAC7C,OAAO,CAAC,UAAU,CAAyB;IAE3C,SAAS,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS;IAOzC,UAAU,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS;IAO1C,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
|
|
@@ -3,7 +3,9 @@ import { PipelineStage } from './stages';
|
|
|
3
3
|
/**
|
|
4
4
|
* @builder
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface UnwindStage extends PipelineStage {
|
|
7
|
+
}
|
|
8
|
+
export declare class UnwindStageImpl implements UnwindStage {
|
|
7
9
|
private arrayFieldName;
|
|
8
10
|
constructor(arrayFieldName: string);
|
|
9
11
|
toProto(): apiTypes.Stage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnwindStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/UnwindStage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"UnwindStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/UnwindStage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,aAAa;CAAG;AAErD,qBAAa,eAAgB,YAAW,WAAW;IACrC,OAAO,CAAC,cAAc;gBAAd,cAAc,EAAE,MAAM;IAE1C,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/stages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"stages.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/stages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAiB,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,SAAS,EAAiB,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EACL,kBAAkB,EAEnB,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,MAAM,EAAE,8BAUpB,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,IAAI,WAAW,CAAA;IACrB,OAAO,IAAI,YAAY,CAAA;IACvB,KAAK,IAAI,UAAU,CAAA;IACnB,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAA;IAC3C,IAAI,IAAI,SAAS,CAAA;IACjB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAA;IAChC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,oBAAoB,EAAE,MAAM,GAC3B,kBAAkB,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAA;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/wix-data-items-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.186",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rimvydas Gimbutas",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"wallaby": {
|
|
86
86
|
"autoDetect": true
|
|
87
87
|
},
|
|
88
|
-
"falconPackageHash": "
|
|
88
|
+
"falconPackageHash": "2a261a901ec5ad7298a027966bf947efc4531afbb7c2ada78de876d8"
|
|
89
89
|
}
|