@infrab4a/connect 4.2.0-beta.4 → 4.2.0-beta.5
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/index.cjs.js +5 -18
- package/index.esm.js +5 -18
- package/package.json +1 -1
- package/teste2.d.ts +0 -1
package/index.cjs.js
CHANGED
|
@@ -2384,12 +2384,10 @@ class ProductsIndex {
|
|
|
2384
2384
|
'rate',
|
|
2385
2385
|
];
|
|
2386
2386
|
const filter = [{ term: { published: true } }];
|
|
2387
|
-
if (
|
|
2388
|
-
fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
|
|
2389
|
-
}
|
|
2390
|
-
else {
|
|
2387
|
+
if (shop && shop !== exports.Shops.ALL)
|
|
2391
2388
|
filter.push({ term: { tags: shop == exports.Shops.GLAMSHOP ? 'feminino' : 'masculino' } });
|
|
2392
|
-
|
|
2389
|
+
if (size > 9)
|
|
2390
|
+
fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
|
|
2393
2391
|
const search = await this.adapter.query(this.index, {
|
|
2394
2392
|
size,
|
|
2395
2393
|
_source: fields,
|
|
@@ -2398,18 +2396,7 @@ class ProductsIndex {
|
|
|
2398
2396
|
must: {
|
|
2399
2397
|
multi_match: {
|
|
2400
2398
|
query: `${searchTerm}`,
|
|
2401
|
-
|
|
2402
|
-
fields: [
|
|
2403
|
-
'name',
|
|
2404
|
-
'name.folded',
|
|
2405
|
-
'name.search',
|
|
2406
|
-
'description',
|
|
2407
|
-
'description.search',
|
|
2408
|
-
'description.folded',
|
|
2409
|
-
'brand',
|
|
2410
|
-
'brand.search',
|
|
2411
|
-
'brand.folded',
|
|
2412
|
-
],
|
|
2399
|
+
fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
|
|
2413
2400
|
fuzziness: 2,
|
|
2414
2401
|
},
|
|
2415
2402
|
},
|
|
@@ -2642,7 +2629,7 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2642
2629
|
const collection = this.collection(this.buildCollectionPathForFind(find.filters));
|
|
2643
2630
|
const enableCount = (_b = (_a = find === null || find === void 0 ? void 0 : find.options) === null || _a === void 0 ? void 0 : _a.enableCount) !== null && _b !== void 0 ? _b : true;
|
|
2644
2631
|
const intercepted = await ((_d = (_c = this.interceptors) === null || _c === void 0 ? void 0 : _c.request) === null || _d === void 0 ? void 0 : _d.call(_c, { find }));
|
|
2645
|
-
const { filters, limits, orderBy } = intercepted.find || find;
|
|
2632
|
+
const { filters, limits, orderBy } = (intercepted === null || intercepted === void 0 ? void 0 : intercepted.find) || find;
|
|
2646
2633
|
const queries = this.makeFirestoreWhere(filters || {});
|
|
2647
2634
|
const ordination = this.makeFirestoreOrderBy(filters, orderBy);
|
|
2648
2635
|
const offsets = await this.defineLimits(filters, limits);
|
package/index.esm.js
CHANGED
|
@@ -2378,12 +2378,10 @@ class ProductsIndex {
|
|
|
2378
2378
|
'rate',
|
|
2379
2379
|
];
|
|
2380
2380
|
const filter = [{ term: { published: true } }];
|
|
2381
|
-
if (
|
|
2382
|
-
fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
|
|
2383
|
-
}
|
|
2384
|
-
else {
|
|
2381
|
+
if (shop && shop !== Shops.ALL)
|
|
2385
2382
|
filter.push({ term: { tags: shop == Shops.GLAMSHOP ? 'feminino' : 'masculino' } });
|
|
2386
|
-
|
|
2383
|
+
if (size > 9)
|
|
2384
|
+
fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
|
|
2387
2385
|
const search = await this.adapter.query(this.index, {
|
|
2388
2386
|
size,
|
|
2389
2387
|
_source: fields,
|
|
@@ -2392,18 +2390,7 @@ class ProductsIndex {
|
|
|
2392
2390
|
must: {
|
|
2393
2391
|
multi_match: {
|
|
2394
2392
|
query: `${searchTerm}`,
|
|
2395
|
-
|
|
2396
|
-
fields: [
|
|
2397
|
-
'name',
|
|
2398
|
-
'name.folded',
|
|
2399
|
-
'name.search',
|
|
2400
|
-
'description',
|
|
2401
|
-
'description.search',
|
|
2402
|
-
'description.folded',
|
|
2403
|
-
'brand',
|
|
2404
|
-
'brand.search',
|
|
2405
|
-
'brand.folded',
|
|
2406
|
-
],
|
|
2393
|
+
fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
|
|
2407
2394
|
fuzziness: 2,
|
|
2408
2395
|
},
|
|
2409
2396
|
},
|
|
@@ -2636,7 +2623,7 @@ const withFindFirestore = (MixinBase) => {
|
|
|
2636
2623
|
const collection = this.collection(this.buildCollectionPathForFind(find.filters));
|
|
2637
2624
|
const enableCount = (_b = (_a = find === null || find === void 0 ? void 0 : find.options) === null || _a === void 0 ? void 0 : _a.enableCount) !== null && _b !== void 0 ? _b : true;
|
|
2638
2625
|
const intercepted = await ((_d = (_c = this.interceptors) === null || _c === void 0 ? void 0 : _c.request) === null || _d === void 0 ? void 0 : _d.call(_c, { find }));
|
|
2639
|
-
const { filters, limits, orderBy } = intercepted.find || find;
|
|
2626
|
+
const { filters, limits, orderBy } = (intercepted === null || intercepted === void 0 ? void 0 : intercepted.find) || find;
|
|
2640
2627
|
const queries = this.makeFirestoreWhere(filters || {});
|
|
2641
2628
|
const ordination = this.makeFirestoreOrderBy(filters, orderBy);
|
|
2642
2629
|
const offsets = await this.defineLimits(filters, limits);
|
package/package.json
CHANGED
package/teste2.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|