@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.
- package/domain/catalog/models/category-base.d.ts +29 -0
- package/domain/catalog/models/category-for-product.d.ts +5 -0
- package/domain/catalog/models/category.d.ts +5 -29
- package/domain/catalog/models/kit-product.d.ts +3 -3
- package/domain/catalog/models/product-base.d.ts +40 -0
- package/domain/catalog/models/product-for-category.d.ts +7 -0
- package/domain/catalog/models/product-for-kit.d.ts +7 -0
- package/domain/catalog/models/product.d.ts +5 -40
- package/esm2020/domain/catalog/models/category-base.mjs +18 -0
- package/esm2020/domain/catalog/models/category-for-product.mjs +7 -0
- package/esm2020/domain/catalog/models/category.mjs +5 -14
- package/esm2020/domain/catalog/models/kit-product.mjs +6 -6
- package/esm2020/domain/catalog/models/product-base.mjs +25 -0
- package/esm2020/domain/catalog/models/product-for-category.mjs +14 -0
- package/esm2020/domain/catalog/models/product-for-kit.mjs +14 -0
- package/esm2020/domain/catalog/models/product.mjs +6 -24
- package/esm2020/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +2 -2
- package/fesm2015/infrab4a-connect.mjs +62 -24
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +62 -24
- package/fesm2020/infrab4a-connect.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1197,21 +1197,27 @@ class Filter extends BaseModel {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
-
class
|
|
1200
|
+
class CategoryBase extends BaseModel {
|
|
1201
1201
|
static get identifiersFields() {
|
|
1202
|
-
return ['
|
|
1202
|
+
return ['id'];
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
__decorate([
|
|
1206
|
-
Type(() =>
|
|
1207
|
-
__metadata("design:type",
|
|
1208
|
-
],
|
|
1206
|
+
Type(() => CategoryBase),
|
|
1207
|
+
__metadata("design:type", CategoryBase)
|
|
1208
|
+
], CategoryBase.prototype, "parent", void 0);
|
|
1209
1209
|
__decorate([
|
|
1210
|
-
Type(() =>
|
|
1211
|
-
__metadata("design:type",
|
|
1212
|
-
],
|
|
1210
|
+
Type(() => Filter),
|
|
1211
|
+
__metadata("design:type", Array)
|
|
1212
|
+
], CategoryBase.prototype, "filters", void 0);
|
|
1213
1213
|
|
|
1214
|
-
class
|
|
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(() =>
|
|
1239
|
-
__metadata("design:type",
|
|
1240
|
-
],
|
|
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(() =>
|
|
1243
|
-
__metadata("design:type",
|
|
1244
|
-
],
|
|
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
|
|
1268
|
+
class ProductForCategory extends ProductBase {
|
|
1247
1269
|
static get identifiersFields() {
|
|
1248
1270
|
return ['id'];
|
|
1249
1271
|
}
|
|
1250
1272
|
}
|
|
1251
1273
|
__decorate([
|
|
1252
|
-
Type(() =>
|
|
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
|
-
],
|
|
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(() =>
|
|
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);
|