@infrab4a/connect 4.0.0-beta.41 → 4.0.0-beta.43

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.
@@ -1197,21 +1197,27 @@ class Filter extends BaseModel {
1197
1197
  }
1198
1198
  }
1199
1199
 
1200
- class KitProduct extends BaseModel {
1200
+ class CategoryBase extends BaseModel {
1201
1201
  static get identifiersFields() {
1202
- return ['productId', 'kitProductId'];
1202
+ return ['id'];
1203
1203
  }
1204
1204
  }
1205
1205
  __decorate([
1206
- Type(() => Product),
1207
- __metadata("design:type", Product)
1208
- ], KitProduct.prototype, "kit", void 0);
1206
+ Type(() => CategoryBase),
1207
+ __metadata("design:type", CategoryBase)
1208
+ ], CategoryBase.prototype, "parent", void 0);
1209
1209
  __decorate([
1210
- Type(() => Product),
1211
- __metadata("design:type", Product)
1212
- ], KitProduct.prototype, "product", void 0);
1210
+ Type(() => Filter),
1211
+ __metadata("design:type", Array)
1212
+ ], CategoryBase.prototype, "filters", void 0);
1213
1213
 
1214
- class Product extends BaseModel {
1214
+ class CategoryForProduct extends CategoryBase {
1215
+ static get identifiersFields() {
1216
+ return ['id'];
1217
+ }
1218
+ }
1219
+
1220
+ class ProductBase extends BaseModel {
1215
1221
  get evaluation() {
1216
1222
  return {
1217
1223
  reviews: this.reviews,
@@ -1234,30 +1240,48 @@ class Product extends BaseModel {
1234
1240
  return ['id'];
1235
1241
  }
1236
1242
  }
1243
+
1244
+ class ProductForKit extends ProductBase {
1245
+ static get identifiersFields() {
1246
+ return ['id'];
1247
+ }
1248
+ }
1237
1249
  __decorate([
1238
- Type(() => Category),
1239
- __metadata("design:type", Category)
1240
- ], Product.prototype, "category", void 0);
1250
+ Type(() => CategoryForProduct),
1251
+ __metadata("design:type", CategoryForProduct)
1252
+ ], ProductForKit.prototype, "category", void 0);
1253
+
1254
+ class KitProduct extends BaseModel {
1255
+ static get identifiersFields() {
1256
+ return ['productId', 'kitProductId'];
1257
+ }
1258
+ }
1241
1259
  __decorate([
1242
- Type(() => KitProduct),
1243
- __metadata("design:type", Array)
1244
- ], Product.prototype, "kitProducts", void 0);
1260
+ Type(() => ProductForKit),
1261
+ __metadata("design:type", ProductForKit)
1262
+ ], KitProduct.prototype, "kit", void 0);
1263
+ __decorate([
1264
+ Type(() => ProductForKit),
1265
+ __metadata("design:type", ProductForKit)
1266
+ ], KitProduct.prototype, "product", void 0);
1245
1267
 
1246
- class Category extends BaseModel {
1268
+ class ProductForCategory extends ProductBase {
1247
1269
  static get identifiersFields() {
1248
1270
  return ['id'];
1249
1271
  }
1250
1272
  }
1251
1273
  __decorate([
1252
- Type(() => Category),
1253
- __metadata("design:type", Category)
1254
- ], Category.prototype, "parent", void 0);
1255
- __decorate([
1256
- Type(() => Filter),
1274
+ Type(() => KitProduct),
1257
1275
  __metadata("design:type", Array)
1258
- ], Category.prototype, "filters", void 0);
1276
+ ], ProductForCategory.prototype, "kitProducts", void 0);
1277
+
1278
+ class Category extends CategoryBase {
1279
+ static get identifiersFields() {
1280
+ return ['id'];
1281
+ }
1282
+ }
1259
1283
  __decorate([
1260
- Type(() => Product),
1284
+ Type(() => ProductForCategory),
1261
1285
  __metadata("design:type", Array)
1262
1286
  ], Category.prototype, "childrenProducts", void 0);
1263
1287
 
@@ -1306,6 +1330,20 @@ class FilterOption extends BaseModel {
1306
1330
  }
1307
1331
  }
1308
1332
 
1333
+ class Product extends ProductBase {
1334
+ static get identifiersFields() {
1335
+ return ['id'];
1336
+ }
1337
+ }
1338
+ __decorate([
1339
+ Type(() => CategoryForProduct),
1340
+ __metadata("design:type", CategoryForProduct)
1341
+ ], Product.prototype, "category", void 0);
1342
+ __decorate([
1343
+ Type(() => KitProduct),
1344
+ __metadata("design:type", Array)
1345
+ ], Product.prototype, "kitProducts", void 0);
1346
+
1309
1347
  class Variant extends BaseModel {
1310
1348
  static get identifiersFields() {
1311
1349
  return ['id', 'productId'];
@@ -1888,7 +1926,7 @@ const withFindFirestore = (MixinBase) => {
1888
1926
  ], []);
1889
1927
  this.buildWhereSentence = (fieldName, options) => {
1890
1928
  if (this.isSubCollection(this) && fieldName === this.parentIdField)
1891
- [];
1929
+ return [];
1892
1930
  const value = (options === null || options === void 0 ? void 0 : options.value) || options;
1893
1931
  const object = {};
1894
1932
  set(object, fieldName, value);